aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--libempathy-gtk/empathy-chat-window.c8
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c14
3 files changed, 27 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index da4114cc4..36f45346a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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:
* megaphone/data/GNOME_Megaphone_Applet.schemas.in: Updated to use new
avatar cache.
diff --git a/libempathy-gtk/empathy-chat-window.c b/libempathy-gtk/empathy-chat-window.c
index 41402f252..5d5a1eafe 100644
--- a/libempathy-gtk/empathy-chat-window.c
+++ b/libempathy-gtk/empathy-chat-window.c
@@ -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
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 1fcbf4440..d199165a4 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -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