aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-13 23:54:58 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-15 03:58:29 +0800
commit0af3ff804c0d71c76fd63f0a2a152cac7de64863 (patch)
treee80b7e357654f0dcc3cef08e1d2d459b9cf45d85 /calendar/gui
parent7087e222f8422470c44ce2ecd5c598fefd2315fc (diff)
downloadgsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.gz
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.bz2
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.lz
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.xz
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.zst
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.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/gui')
-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);