[empathy] individual-widget: display channels list if available
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] individual-widget: display channels list if available
- Date: Wed, 16 Nov 2011 14:12:31 +0000 (UTC)
commit 0366e5107bab62b34028d650242f44b1d4559382
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Nov 10 12:03:50 2011 +0100
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 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index bbd8c96..4883c62 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]