[gnumeric] GUI: Fix tooltip positioning.



commit 435d3eda059073526e97edafe624003a42ee7625
Author: Morten Welinder <terra gnome org>
Date:   Mon Apr 27 09:17:09 2009 -0400

    GUI: Fix tooltip positioning.
---
 ChangeLog         |    7 +++++++
 NEWS              |    2 ++
 src/item-bar.c    |    3 ++-
 src/item-cursor.c |    3 ++-
 src/item-grid.c   |    3 ++-
 5 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b05ae43..3558dd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-04-27  Morten Welinder  <terra gnome org>
+
+	* src/item-grid.c (cb_cursor_come_to_rest): Fix tooltip
+	positioning.
+	* src/item-cursor.c (item_cursor_tip_setlabel): Ditto.
+	* src/item-bar.c (item_bar_event): Ditto.  Fixes #580358.
+
 2009-04-26  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/gui-util.h (gnm_create_std_tags_for_buffer): new
diff --git a/NEWS b/NEWS
index d1674b2..9c9d4b5 100644
--- a/NEWS
+++ b/NEWS
@@ -3,9 +3,11 @@ Gnumeric 1.9.7
 Andreas:
 	* Fix some divergence between character weight in the label properties
 	  dialog and the label itself.
+
 Morten:
 	* Fix xls save problem with sheets that are too big for the format.
 	* Fix global-name .gnumeric warning.  [#580227]
+	* Fix tooltip positioning.  [#580358]
 
 --------------------------------------------------------------------------
 Gnumeric 1.9.6
diff --git a/src/item-bar.c b/src/item-bar.c
index c0de235..f507df4 100644
--- a/src/item-bar.c
+++ b/src/item-bar.c
@@ -965,8 +965,9 @@ item_bar_event (FooCanvasItem *item, GdkEvent *e)
 
 			if (ib->tip == NULL) {
 				GtkWidget *cw = GTK_WIDGET (canvas);
+				GdkWindow *cbw = GTK_LAYOUT (canvas)->bin_window;
 				int wx, wy;
-				gdk_window_get_origin (cw->window, &wx, &wy);
+				gdk_window_get_origin (cbw, &wx, &wy);
 				ib->tip = gnumeric_create_tooltip (cw);
 				colrow_tip_setlabel (ib, is_cols, ib->colrow_resize_size);
 				/* Position above the current point for both
diff --git a/src/item-cursor.c b/src/item-cursor.c
index dbbde88..27206f3 100644
--- a/src/item-cursor.c
+++ b/src/item-cursor.c
@@ -1063,8 +1063,9 @@ item_cursor_tip_setlabel (ItemCursor *ic, char const *text)
 {
 	if (ic->tip == NULL) {
 		GtkWidget *cw = GTK_WIDGET (FOO_CANVAS_ITEM (ic)->canvas);
+		GdkWindow *cbw = GTK_LAYOUT (cw)->bin_window;
 		int wx, wy;
-		gdk_window_get_origin (cw->window, &wx, &wy);
+		gdk_window_get_origin (cbw, &wx, &wy);
 		ic->tip = gnumeric_create_tooltip (cw);
 		gnumeric_position_tooltip (ic->tip,
 					   wx + ic->last_x,
diff --git a/src/item-grid.c b/src/item-grid.c
index 23f4de2..e9025e5 100644
--- a/src/item-grid.c
+++ b/src/item-grid.c
@@ -967,8 +967,9 @@ cb_cursor_come_to_rest (ItemGrid *ig)
 
 		if (ig->tip == NULL && strlen (tiptext) > 0) {
 			GtkWidget *cw = GTK_WIDGET (canvas);
+			GdkWindow *cbw = GTK_LAYOUT (canvas)->bin_window;
 			int wx, wy;
-			gdk_window_get_origin (cw->window, &wx, &wy);
+			gdk_window_get_origin (cbw, &wx, &wy);
 			ig->tip = gnumeric_create_tooltip (cw);
 			gnumeric_position_tooltip (ig->tip,
 						   wx + ig->last_x,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]