[empathy] empathy_roster_view_query_tooltip: set the tooltip next to the right child
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy_roster_view_query_tooltip: set the tooltip next to the right child
- Date: Mon, 18 Jun 2012 11:20:51 +0000 (UTC)
commit 5a535ee7a9d488a608e7934839fa989b804f9577
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Jun 18 11:26:48 2012 +0200
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
libempathy-gtk/empathy-roster-view.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index b823b71..7ae8052 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]