diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-12-23 20:41:59 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-01-07 01:54:06 +0800 |
commit | 027aa3f769422d5cb1a4c09541f0f2928028464b (patch) | |
tree | 788e354fe9248ee0259302f93a1fef24c39af784 | |
parent | 6ebf46cb5048e90de75dceead5df6052e776a3a3 (diff) | |
download | gsoc2013-empathy-027aa3f769422d5cb1a4c09541f0f2928028464b.tar gsoc2013-empathy-027aa3f769422d5cb1a4c09541f0f2928028464b.tar.gz gsoc2013-empathy-027aa3f769422d5cb1a4c09541f0f2928028464b.tar.bz2 gsoc2013-empathy-027aa3f769422d5cb1a4c09541f0f2928028464b.tar.lz gsoc2013-empathy-027aa3f769422d5cb1a4c09541f0f2928028464b.tar.xz gsoc2013-empathy-027aa3f769422d5cb1a4c09541f0f2928028464b.tar.zst gsoc2013-empathy-027aa3f769422d5cb1a4c09541f0f2928028464b.zip |
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.
-rw-r--r-- | 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 fe4be30df..292d97ced 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); |