diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2003-04-01 02:25:45 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2003-04-01 02:25:45 +0800 |
commit | a95a2f5a696e14f9ebda08692f7e1c596de794d0 (patch) | |
tree | 10d22873595073fb464816f868101badb1c3f9ab /calendar/gui | |
parent | 2b1b1cefe98ed500d6add08a5828f5c46aa3000a (diff) | |
download | gsoc2013-evolution-a95a2f5a696e14f9ebda08692f7e1c596de794d0.tar gsoc2013-evolution-a95a2f5a696e14f9ebda08692f7e1c596de794d0.tar.gz gsoc2013-evolution-a95a2f5a696e14f9ebda08692f7e1c596de794d0.tar.bz2 gsoc2013-evolution-a95a2f5a696e14f9ebda08692f7e1c596de794d0.tar.lz gsoc2013-evolution-a95a2f5a696e14f9ebda08692f7e1c596de794d0.tar.xz gsoc2013-evolution-a95a2f5a696e14f9ebda08692f7e1c596de794d0.tar.zst gsoc2013-evolution-a95a2f5a696e14f9ebda08692f7e1c596de794d0.zip |
Fixes #39961
2003-03-31 Rodrigo Moya <rodrigo@ximian.com>
Fixes #39961
* gui/e-meeting-time-sel.c
(e_meeting_time_selector_options_menu_position_callback):
(e_meeting_time_selector_autopick_menu_position_callback): use the
button's allocation to position the popup menu.
svn path=/trunk/; revision=20599
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-meeting-time-sel.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c index 7b41074085..fec13635f5 100644 --- a/calendar/gui/e-meeting-time-sel.c +++ b/calendar/gui/e-meeting-time-sel.c @@ -1413,21 +1413,12 @@ e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu, gpointer user_data) { EMeetingTimeSelector *mts; - GtkRequisition menu_requisition; - gint max_x, max_y; mts = E_MEETING_TIME_SELECTOR (user_data); /* Calculate our preferred position. */ - gdk_window_get_origin (mts->options_button->window, x, y); - *y += mts->options_button->allocation.height; - - /* Now make sure we are on the screen. */ - gtk_widget_size_request (mts->options_menu, &menu_requisition); - max_x = MAX (0, gdk_screen_width () - menu_requisition.width); - max_y = MAX (0, gdk_screen_height () - menu_requisition.height); - *x = CLAMP (*x, 0, max_x); - *y = CLAMP (*y, 0, max_y); + *x = mts->options_button->allocation.x; + *y = mts->options_button->allocation.y + mts->options_button->allocation.height; } static void @@ -1461,21 +1452,12 @@ e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu, gpointer user_data) { EMeetingTimeSelector *mts; - GtkRequisition menu_requisition; - gint max_x, max_y; mts = E_MEETING_TIME_SELECTOR (user_data); /* Calculate our preferred position. */ - gdk_window_get_origin (mts->autopick_button->window, x, y); - *y += mts->autopick_button->allocation.height; - - /* Now make sure we are on the screen. */ - gtk_widget_size_request (mts->autopick_menu, &menu_requisition); - max_x = MAX (0, gdk_screen_width () - menu_requisition.width); - max_y = MAX (0, gdk_screen_height () - menu_requisition.height); - *x = CLAMP (*x, 0, max_x); - *y = CLAMP (*y, 0, max_y); + *x = mts->autopick_button->allocation.x; + *y = mts->autopick_button->allocation.y + mts->autopick_button->allocation.height; } |