aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-10 19:03:50 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-11-16 18:31:31 +0800
commit0366e5107bab62b34028d650242f44b1d4559382 (patch)
tree1e8f236d44a65069d1ec139c97ce5a81fee9d833 /libempathy-gtk
parentcaae76cdabb9939989d196cef7f367dcb26c8d44 (diff)
downloadgsoc2013-empathy-0366e5107bab62b34028d650242f44b1d4559382.tar
gsoc2013-empathy-0366e5107bab62b34028d650242f44b1d4559382.tar.gz
gsoc2013-empathy-0366e5107bab62b34028d650242f44b1d4559382.tar.bz2
gsoc2013-empathy-0366e5107bab62b34028d650242f44b1d4559382.tar.lz
gsoc2013-empathy-0366e5107bab62b34028d650242f44b1d4559382.tar.xz
gsoc2013-empathy-0366e5107bab62b34028d650242f44b1d4559382.tar.zst
gsoc2013-empathy-0366e5107bab62b34028d650242f44b1d4559382.zip
individual-widget: display channels list if available
This will be needed when using this widget in MUC. https://bugzilla.gnome.org/show_bug.cgi?id=663763
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-widget.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index bbd8c9629..4883c62e7 100644
--- a/libempathy-gtk/empathy-individual-widget.c
+++ b/libempathy-gtk/empathy-individual-widget.c
@@ -235,6 +235,9 @@ details_update_show (EmpathyIndividualWidget *self,
EmpathyIndividualWidgetPriv *priv = GET_PRIV (self);
GList *info, *l;
guint n_rows = 0;
+ GtkWidget *channels_label;
+ TpConnection *conn;
+ TpAccount *account;
info = tp_contact_get_contact_info (contact);
info = g_list_sort (info, (GCompareFunc) empathy_contact_info_field_cmp);
@@ -287,6 +290,25 @@ details_update_show (EmpathyIndividualWidget *self,
n_rows++;
}
+
+ conn = tp_contact_get_connection (contact);
+ account = tp_connection_get_account (conn);
+
+ channels_label = empathy_contact_info_create_channel_list_label (account,
+ info, n_rows);
+
+ if (channels_label != NULL)
+ {
+ GtkWidget *title_widget;
+
+ title_widget = gtk_label_new (_("Channels:"));
+
+ add_row (GTK_GRID (priv->grid_details), n_rows, title_widget,
+ channels_label);
+
+ n_rows++;
+ }
+
g_list_free (info);
return n_rows;