From 0366e5107bab62b34028d650242f44b1d4559382 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 10 Nov 2011 12:03:50 +0100 Subject: [PATCH] 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 --- libempathy-gtk/empathy-individual-widget.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c index bbd8c962..4883c62e 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; -- 2.39.2