aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-26 23:28:00 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-26 23:32:44 +0800
commitaef5465e619c75eb8b310ebd38a511c1cb6f924b (patch)
treece42eb28764bbab1aa93b586d5586401334b0deb
parentd5872cec74644d7e3c53a65433271ca05c67c4b9 (diff)
downloadgsoc2013-empathy-aef5465e619c75eb8b310ebd38a511c1cb6f924b.tar
gsoc2013-empathy-aef5465e619c75eb8b310ebd38a511c1cb6f924b.tar.gz
gsoc2013-empathy-aef5465e619c75eb8b310ebd38a511c1cb6f924b.tar.bz2
gsoc2013-empathy-aef5465e619c75eb8b310ebd38a511c1cb6f924b.tar.lz
gsoc2013-empathy-aef5465e619c75eb8b310ebd38a511c1cb6f924b.tar.xz
gsoc2013-empathy-aef5465e619c75eb8b310ebd38a511c1cb6f924b.tar.zst
gsoc2013-empathy-aef5465e619c75eb8b310ebd38a511c1cb6f924b.zip
Fix selectable labels in EmpathyIndividualWidget
Ensure that labels in EmpathyIndividualWidget are only selectable if the widget isn't in tooltip mode. Closes: bgo#627917
-rw-r--r--libempathy-gtk/empathy-individual-widget.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index be6b56b3d..302aa4fb9 100644
--- a/libempathy-gtk/empathy-individual-widget.c
+++ b/libempathy-gtk/empathy-individual-widget.c
@@ -258,8 +258,8 @@ details_update_show (EmpathyIndividualWidget *self,
g_free (markup);
}
- if (!(priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP))
- gtk_label_set_selectable (GTK_LABEL (w), TRUE);
+ gtk_label_set_selectable (GTK_LABEL (w),
+ (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP) ? FALSE : TRUE);
gtk_table_attach_defaults (GTK_TABLE (priv->table_details),
w, 1, 2, n_rows, n_rows + 1);
@@ -650,8 +650,9 @@ location_update (EmpathyIndividualWidget *self)
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
gtk_widget_show (label);
- if (!(priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP))
- gtk_label_set_selectable (GTK_LABEL (label), TRUE);
+ gtk_label_set_selectable (GTK_LABEL (label),
+ (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP) ? FALSE :
+ TRUE);
}
g_free (svalue);
@@ -1235,8 +1236,8 @@ alias_presence_avatar_favourite_set_up (EmpathyIndividualWidget *self,
else
{
alias = gtk_label_new (NULL);
- if (!(priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP))
- gtk_label_set_selectable (GTK_LABEL (alias), TRUE);
+ gtk_label_set_selectable (GTK_LABEL (alias),
+ (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP) ? FALSE : TRUE);
gtk_misc_set_alignment (GTK_MISC (alias), 0.0, 0.5);
}
@@ -1399,7 +1400,8 @@ add_persona (EmpathyIndividualWidget *self,
hbox = GTK_BOX (gtk_hbox_new (FALSE, 6));
account_label = gtk_label_new (NULL);
- gtk_label_set_selectable (GTK_LABEL (account_label), TRUE);
+ gtk_label_set_selectable (GTK_LABEL (account_label),
+ (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP) ? FALSE : TRUE);
gtk_misc_set_alignment (GTK_MISC (account_label), 0.0, 0.5);
gtk_widget_show (account_label);
@@ -1426,7 +1428,8 @@ add_persona (EmpathyIndividualWidget *self,
/* Set up ID label */
label = gtk_label_new (NULL);
- gtk_label_set_selectable (GTK_LABEL (label), TRUE);
+ gtk_label_set_selectable (GTK_LABEL (label),
+ (priv->flags & EMPATHY_INDIVIDUAL_WIDGET_FOR_TOOLTIP) ? FALSE : TRUE);
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
g_object_set_data (G_OBJECT (table), "id-widget", label);