]> git.0d.be Git - empathy.git/commitdiff
Hide VOIP stuff if empathy is not compiled with --enable-voip=yes. Fixes
authorXavier Claessens <xclaesse@gmail.com>
Mon, 1 Oct 2007 11:09:39 +0000 (11:09 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Mon, 1 Oct 2007 11:09:39 +0000 (11:09 +0000)
2007-10-01  Xavier Claessens  <xclaesse@gmail.com>

* libempathy-gtk/empathy-contact-list-view.c:
* libempathy-gtk/empathy-chat-window.c: Hide VOIP stuff if empathy is
not compiled with --enable-voip=yes. Fixes bug #482111
(Sjoerd Simons, Xavier Claessens).

svn path=/trunk/; revision=344

ChangeLog
libempathy-gtk/empathy-chat-window.c
libempathy-gtk/empathy-contact-list-view.c

index da4114cc439a8c57d18af55fac815b985694a161..36f45346a8c572df16336ee14ebcf34e9037dcce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-01  Xavier Claessens  <xclaesse@gmail.com>
+
+       * libempathy-gtk/empathy-contact-list-view.c:
+       * libempathy-gtk/empathy-chat-window.c: Hide VOIP stuff if empathy is
+       not compiled with --enable-voip=yes. Fixes bug #482111
+       (Sjoerd Simons, Xavier Claessens).
+
 2007-10-01  Xavier Claessens  <xclaesse@gmail.com>
 
        * megaphone/src/megaphone-applet.c:
index 41402f2526b841ec8bc76c8181608fe96ede1979..5d5a1eafef8289464e937430172ec8c0211c5938 100644 (file)
@@ -989,8 +989,12 @@ chat_window_conv_activate_cb (GtkWidget         *menuitem,
        }
 
        gtk_widget_set_sensitive (priv->menu_conv_log, log_exists);
-       g_object_set (priv->menu_conv_call, "visible", can_voip, NULL);
-       g_object_set (priv->menu_conv_call_separator, "visible", can_voip, NULL);
+#ifdef HAVE_VOIP
+       gtk_widget_set_sensitive (priv->menu_conv_call, can_voip);
+#else 
+       g_object_set (priv->menu_conv_call, "visible", FALSE, NULL);
+       g_object_set (priv->menu_conv_call_separator, "visible", FALSE, NULL);
+#endif
 }
 
 static void
index 1fcbf4440c608f1817002a42a51554c6923d4028..d199165a43b5d31b60bea2f255d1ac24f3ee1eee 100644 (file)
@@ -139,11 +139,13 @@ static void        contact_list_view_pixbuf_cell_data_func     (GtkTreeViewColum
                                                                GtkTreeModel               *model,
                                                                GtkTreeIter                *iter,
                                                                EmpathyContactListView     *view);
+#ifdef HAVE_VOIP
 static void        contact_list_view_voip_cell_data_func       (GtkTreeViewColumn          *tree_column,
                                                                GtkCellRenderer            *cell,
                                                                GtkTreeModel               *model,
                                                                GtkTreeIter                *iter,
                                                                EmpathyContactListView     *view);
+#endif
 static void        contact_list_view_avatar_cell_data_func     (GtkTreeViewColumn          *tree_column,
                                                                GtkCellRenderer            *cell,
                                                                GtkTreeModel               *model,
@@ -170,9 +172,11 @@ static void        contact_list_view_row_activated_cb          (EmpathyContactLi
                                                                GtkTreePath                *path,
                                                                GtkTreeViewColumn          *col,
                                                                gpointer                    user_data);
+#ifdef HAVE_VOIP
 static void        contact_list_view_voip_activated_cb         (EmpathyCellRendererActivatable *cell,
                                                                const gchar                *path_string,
                                                                EmpathyContactListView     *view);
+#endif
 static void        contact_list_view_row_expand_or_collapse_cb (EmpathyContactListView      *view,
                                                                GtkTreeIter                *iter,
                                                                GtkTreePath                *path,
@@ -230,10 +234,12 @@ static const GtkActionEntry entries[] = {
          N_("_View Previous Conversations"), NULL, N_("View previous conversations with this contact"),
          G_CALLBACK (contact_list_view_action_cb)
        },
+#ifdef HAVE_VOIP
        { "Call", EMPATHY_IMAGE_VOIP,
          N_("_Call"), NULL, N_("Start a voice or video conversation with this contact"),
          G_CALLBACK (contact_list_view_action_cb)
        },
+#endif
 };
 
 static guint n_entries = G_N_ELEMENTS (entries);
@@ -242,7 +248,9 @@ static const gchar *ui_info =
        "<ui>"
        "  <popup name='Contact'>"
        "    <menuitem action='Chat'/>"
+#ifdef HAVE_VOIP
        "    <menuitem action='Call'/>"
+#endif
        "    <menuitem action='Log'/>"
        "    <menuitem action='SendFile'/>"
        "    <separator/>"
@@ -629,6 +637,7 @@ contact_list_view_setup (EmpathyContactListView *view)
        gtk_tree_view_column_add_attribute (col, cell,
                                            "is_group", COL_IS_GROUP);
 
+#ifdef HAVE_VOIP
        /* Voip Capability Icon */
        cell = empathy_cell_renderer_activatable_new ();
        gtk_tree_view_column_pack_start (col, cell, FALSE);
@@ -644,6 +653,7 @@ contact_list_view_setup (EmpathyContactListView *view)
        g_signal_connect (cell, "path-activated",
                          G_CALLBACK (contact_list_view_voip_activated_cb),
                          view);
+#endif
 
        /* Avatar */
        cell = gtk_cell_renderer_pixbuf_new ();
@@ -1078,6 +1088,7 @@ contact_list_view_pixbuf_cell_data_func (GtkTreeViewColumn     *tree_column,
        contact_list_view_cell_set_background (view, cell, is_group, is_active);
 }
 
+#ifdef HAVE_VOIP
 static void
 contact_list_view_voip_cell_data_func (GtkTreeViewColumn      *tree_column,
                                       GtkCellRenderer        *cell,
@@ -1102,6 +1113,7 @@ contact_list_view_voip_cell_data_func (GtkTreeViewColumn      *tree_column,
 
        contact_list_view_cell_set_background (view, cell, is_group, is_active);
 }
+#endif
 
 static void
 contact_list_view_avatar_cell_data_func (GtkTreeViewColumn     *tree_column,
@@ -1306,6 +1318,7 @@ contact_list_view_row_activated_cb (EmpathyContactListView *view,
        }
 }
 
+#ifdef HAVE_VOIP
 static void
 contact_list_view_voip_activated_cb (EmpathyCellRendererActivatable *cell,
                                     const gchar                    *path_string,
@@ -1332,6 +1345,7 @@ contact_list_view_voip_activated_cb (EmpathyCellRendererActivatable *cell,
                g_object_unref (contact);
        }
 }
+#endif
 
 
 static void