[empathy] contact-list-view: merge the audio and vido call column
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] contact-list-view: merge the audio and vido call column
- Date: Wed, 6 Jan 2010 17:54:23 +0000 (UTC)
commit 027aa3f769422d5cb1a4c09541f0f2928028464b
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Dec 23 12:41:59 2009 +0000
contact-list-view: merge the audio and vido call column
Now that we display a context menu allowing to start audio and video call
there is no point to keep the 2 icons. Merge them to one column as they are
not just a hint saying that the contact supports audio and/or video.
libempathy-gtk/empathy-contact-list-view.c | 52 +++-------------------------
1 files changed, 5 insertions(+), 47 deletions(-)
---
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index fe4be30..292d97c 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -869,50 +869,24 @@ contact_list_view_audio_call_cell_data_func (
{
gboolean is_group;
gboolean is_active;
- gboolean can_voip;
+ gboolean can_audio, can_video;
gtk_tree_model_get (model, iter,
EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP, &is_group,
EMPATHY_CONTACT_LIST_STORE_COL_IS_ACTIVE, &is_active,
- EMPATHY_CONTACT_LIST_STORE_COL_CAN_AUDIO_CALL, &can_voip,
+ EMPATHY_CONTACT_LIST_STORE_COL_CAN_AUDIO_CALL, &can_audio,
+ EMPATHY_CONTACT_LIST_STORE_COL_CAN_VIDEO_CALL, &can_video,
-1);
g_object_set (cell,
- "visible", !is_group && can_voip,
- "icon-name", EMPATHY_IMAGE_VOIP,
+ "visible", !is_group && (can_audio || can_video),
+ "icon-name", can_video? EMPATHY_IMAGE_VIDEO_CALL : EMPATHY_IMAGE_VOIP,
NULL);
contact_list_view_cell_set_background (view, cell, is_group, is_active);
}
static void
-contact_list_view_video_call_cell_data_func (
- GtkTreeViewColumn *tree_column,
- GtkCellRenderer *cell,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- EmpathyContactListView *view)
-{
- gboolean is_group;
- gboolean is_active;
- gboolean can_voip;
-
- gtk_tree_model_get (model, iter,
- EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP, &is_group,
- EMPATHY_CONTACT_LIST_STORE_COL_IS_ACTIVE, &is_active,
- EMPATHY_CONTACT_LIST_STORE_COL_CAN_VIDEO_CALL, &can_voip,
- -1);
-
- g_object_set (cell,
- "visible", !is_group && can_voip,
- "icon-name", EMPATHY_IMAGE_VIDEO_CALL,
- NULL);
-
- contact_list_view_cell_set_background (view, cell, is_group, is_active);
-}
-
-
-static void
contact_list_view_avatar_cell_data_func (GtkTreeViewColumn *tree_column,
GtkCellRenderer *cell,
GtkTreeModel *model,
@@ -1153,22 +1127,6 @@ contact_list_view_setup (EmpathyContactListView *view)
G_CALLBACK (contact_list_view_call_activated_cb),
view);
- /* Video Call Icon */
- cell = empathy_cell_renderer_activatable_new ();
- gtk_tree_view_column_pack_start (col, cell, FALSE);
- gtk_tree_view_column_set_cell_data_func (
- col, cell,
- (GtkTreeCellDataFunc) contact_list_view_video_call_cell_data_func,
- view, NULL);
-
- g_object_set (cell,
- "visible", FALSE,
- NULL);
-
- g_signal_connect (cell, "path-activated",
- G_CALLBACK (contact_list_view_call_activated_cb),
- view);
-
/* Avatar */
cell = gtk_cell_renderer_pixbuf_new ();
gtk_tree_view_column_pack_start (col, cell, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]