aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-widget.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-23 19:40:19 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-08-23 19:43:21 +0800
commit2aab3515e97c67ab6704f5c49e91a8be6114400a (patch)
tree2edfe99549465ca630e74ab999829b1f799c4801 /libempathy-gtk/empathy-individual-widget.c
parent784b4a32084df08c173e6ca63a8d270e01cc81eb (diff)
downloadgsoc2013-empathy-2aab3515e97c67ab6704f5c49e91a8be6114400a.tar
gsoc2013-empathy-2aab3515e97c67ab6704f5c49e91a8be6114400a.tar.gz
gsoc2013-empathy-2aab3515e97c67ab6704f5c49e91a8be6114400a.tar.bz2
gsoc2013-empathy-2aab3515e97c67ab6704f5c49e91a8be6114400a.tar.lz
gsoc2013-empathy-2aab3515e97c67ab6704f5c49e91a8be6114400a.tar.xz
gsoc2013-empathy-2aab3515e97c67ab6704f5c49e91a8be6114400a.tar.zst
gsoc2013-empathy-2aab3515e97c67ab6704f5c49e91a8be6114400a.zip
Display the number of personas only in tooltips
Diffstat (limited to 'libempathy-gtk/empathy-individual-widget.c')
-rw-r--r--libempathy-gtk/empathy-individual-widget.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index 6d1ecd937..e3c5d723c 100644
--- a/libempathy-gtk/empathy-individual-widget.c
+++ b/libempathy-gtk/empathy-individual-widget.c
@@ -1524,10 +1524,7 @@ individual_table_set_up (EmpathyIndividualWidget *self)
{
EmpathyIndividualWidgetPriv *priv = GET_PRIV (self);
GtkTable *table;
- GtkWidget *label;
- gchar *message;
- GList *personas, *l;
- guint num_personas = 0, current_row = 0;
+ guint current_row = 0;
if (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_EDIT_FAVOURITE)
table = GTK_TABLE (gtk_table_new (4, 3, FALSE));
@@ -1536,25 +1533,34 @@ individual_table_set_up (EmpathyIndividualWidget *self)
gtk_table_set_row_spacings (table, 6);
gtk_table_set_col_spacings (table, 6);
- /* Meta-contacts message displaying how many Telepathy personas we have */
- personas = folks_individual_get_personas (priv->individual);
- for (l = personas; l != NULL; l = l->next)
+ /* We only display the number of personas in tooltips */
+ if (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP)
{
- if (TPF_IS_PERSONA (l->data))
- num_personas++;
- }
+ gchar *message;
+ GtkWidget *label;
+ GList *personas, *l;
+ guint num_personas = 0;
- message = g_strdup_printf (ngettext ("Meta-contact containing %u contact",
- "Meta-contact containing %u contacts", num_personas), num_personas);
- label = gtk_label_new (message);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- g_free (message);
+ /* Meta-contacts message displaying how many Telepathy personas we have */
+ personas = folks_individual_get_personas (priv->individual);
+ for (l = personas; l != NULL; l = l->next)
+ {
+ if (TPF_IS_PERSONA (l->data))
+ num_personas++;
+ }
- gtk_table_attach (table, label, 0, 2, current_row, current_row + 1,
- GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
- gtk_widget_show (label);
+ message = g_strdup_printf (ngettext ("Meta-contact containing %u contact",
+ "Meta-contact containing %u contacts", num_personas), num_personas);
+ label = gtk_label_new (message);
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ g_free (message);
- current_row++;
+ gtk_table_attach (table, label, 0, 2, current_row, current_row + 1,
+ GTK_FILL | GTK_EXPAND, GTK_FILL, 0, 0);
+ gtk_widget_show (label);
+
+ current_row++;
+ }
alias_presence_avatar_favourite_set_up (self, table, current_row);