aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-18 17:26:48 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-06-18 18:58:32 +0800
commit5a535ee7a9d488a608e7934839fa989b804f9577 (patch)
tree394a122f3a229b7bd74f046cb920380561ec0560 /libempathy-gtk
parent43a7d1f1143b857de2ebcccd19286cca8495788b (diff)
downloadgsoc2013-empathy-5a535ee7a9d488a608e7934839fa989b804f9577.tar
gsoc2013-empathy-5a535ee7a9d488a608e7934839fa989b804f9577.tar.gz
gsoc2013-empathy-5a535ee7a9d488a608e7934839fa989b804f9577.tar.bz2
gsoc2013-empathy-5a535ee7a9d488a608e7934839fa989b804f9577.tar.lz
gsoc2013-empathy-5a535ee7a9d488a608e7934839fa989b804f9577.tar.xz
gsoc2013-empathy-5a535ee7a9d488a608e7934839fa989b804f9577.tar.zst
gsoc2013-empathy-5a535ee7a9d488a608e7934839fa989b804f9577.zip
empathy_roster_view_query_tooltip: set the tooltip next to the right child
This ensures that the tooltip is always displayed next to the correct row. https://bugzilla.gnome.org/show_bug.cgi?id=678294
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-roster-view.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index b823b71a4..7ae805239 100644
--- a/libempathy-gtk/empathy-roster-view.c
+++ b/libempathy-gtk/empathy-roster-view.c
@@ -1230,6 +1230,7 @@ empathy_roster_view_query_tooltip (GtkWidget *widget,
GtkWidget *child;
EmpathyRosterContact *contact;
FolksIndividual *individual;
+ gboolean result;
if (self->priv->individual_tooltip_cb == NULL)
return FALSE;
@@ -1241,8 +1242,18 @@ empathy_roster_view_query_tooltip (GtkWidget *widget,
contact = EMPATHY_ROSTER_CONTACT (child);
individual = empathy_roster_contact_get_individual (contact);
- return self->priv->individual_tooltip_cb (self, individual, keyboard_mode,
+ result = self->priv->individual_tooltip_cb (self, individual, keyboard_mode,
tooltip, self->priv->individual_tooltip_data);
+
+ if (result)
+ {
+ GtkAllocation allocation;
+
+ gtk_widget_get_allocation (child, &allocation);
+ gtk_tooltip_set_tip_area (tooltip, (GdkRectangle *) &allocation);
+ }
+
+ return result;
}
void