From ee35e293947fc25aabcab99df5f44957d969eefe Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 4 Oct 2001 07:22:56 +0000 Subject: Call gnome_canvas_world_to_window here. Finishes fixing Ximian bug #2613. 2001-10-04 Christopher James Lahey * e-cell-date-edit.c (e_cell_date_edit_get_popup_pos): Call gnome_canvas_world_to_window here. Finishes fixing Ximian bug #2613. svn path=/trunk/; revision=13405 --- widgets/misc/ChangeLog | 6 ++++++ widgets/misc/e-cell-date-edit.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'widgets') diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index b8d1e21367..4a2e02485d 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,9 @@ +2001-10-04 Christopher James Lahey + + * e-cell-date-edit.c (e_cell_date_edit_get_popup_pos): Call + gnome_canvas_world_to_window here. Finishes fixing Ximian bug + #2613. + 2001-09-18 Damon Chaplin * e-dateedit.c (e_date_edit_grab_focus): grab focus to the date entry diff --git a/widgets/misc/e-cell-date-edit.c b/widgets/misc/e-cell-date-edit.c index d80f988f55..2554b70ff1 100644 --- a/widgets/misc/e-cell-date-edit.c +++ b/widgets/misc/e-cell-date-edit.c @@ -546,7 +546,7 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, GtkWidget *canvas = GTK_WIDGET (GNOME_CANVAS_ITEM (eti)->canvas); GtkRequisition popup_requisition; gint avail_height, screen_width, column_width, row_height; - double x1, y1; + double x1, y1, wx, wy; gdk_window_get_origin (canvas->window, x, y); @@ -558,10 +558,16 @@ e_cell_date_edit_get_popup_pos (ECellDateEdit *ecde, eti->editing_row + 1); gnome_canvas_item_i2w (GNOME_CANVAS_ITEM (eti), &x1, &y1); - *x += x1; + gnome_canvas_world_to_window (GNOME_CANVAS (canvas), + x1, + y1, + &wx, + &wy); + + *x += wx; /* The ETable positions don't include the grid lines, I think, so we add 1. */ - *y += y1 + 1; + *y += wy + 1; avail_height = gdk_screen_height () - *y; -- cgit