aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-13 23:54:58 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:19 +0800
commit2485ba3936c9fdd4e185393d49c34dae7ba1f49d (patch)
tree0836c8d3ebd4636ffa836de97f7217598264e999 /calendar
parent57d45a6536711e3fe974b97642f218ac859e36e7 (diff)
downloadgsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.gz
gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.zst
gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.zip
Fudge gtk_widget_get_preferred_size() for gtk2.
Easy enough to fake gtk_widget_get_preferred_size() in gtk2 using gtk_widget_size_request(). Reduces diff noise with gtk3 branch.
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/e-calendar-view.c2
-rw-r--r--calendar/gui/e-meeting-time-sel.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index 13ea437f2f..868b411a10 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -1740,7 +1740,7 @@ e_calendar_view_move_tip (GtkWidget *widget, gint x, gint y)
screen = gtk_widget_get_screen (widget);
- gtk_widget_size_request (widget, &requisition);
+ gtk_widget_get_preferred_size (widget, &requisition, NULL);
w = requisition.width;
h = requisition.height;
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 4b2ccfc67f..8b6f36da6b 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -46,6 +46,9 @@
#include "e-meeting-list-view.h"
#include "e-meeting-time-sel-item.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
#define E_MEETING_TIME_SELECTOR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_MEETING_TIME_SELECTOR, EMeetingTimeSelectorPrivate))
@@ -1741,7 +1744,7 @@ e_meeting_time_selector_options_menu_position_callback (GtkMenu *menu,
*y += allocation.y + allocation.height - 2;
/* Now make sure we are on the screen. */
- gtk_widget_size_request (mts->options_menu, &menu_requisition);
+ gtk_widget_get_preferred_size (mts->options_menu, &menu_requisition, NULL);
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);
@@ -1794,7 +1797,7 @@ e_meeting_time_selector_autopick_menu_position_callback (GtkMenu *menu,
*y += allocation.y + allocation.height - 2;
/* Now make sure we are on the screen. */
- gtk_widget_size_request (mts->autopick_menu, &menu_requisition);
+ gtk_widget_get_preferred_size (mts->autopick_menu, &menu_requisition, NULL);
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);