summaryrefslogtreecommitdiff
path: root/src/caja-zoom-control.c
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-08 01:03:47 +0200
committerJasmine Hassan <[email protected]>2012-11-16 09:45:52 +0200
commit48d2f19ea2b821d1f3b3017afc912154ab2ee7da (patch)
tree599e2a5998d582176ca84f7abf30f88c600705fc /src/caja-zoom-control.c
parente5b2fbf43e1c1ad5552abb004e5ebc4beb17ce2c (diff)
downloadcaja-48d2f19ea2b821d1f3b3017afc912154ab2ee7da.tar.bz2
caja-48d2f19ea2b821d1f3b3017afc912154ab2ee7da.tar.xz
[src] use gtk_widget_get_preferred_size()
http://git.gnome.org/browse/nautilus/commit/?id=c47d18f566fa9518ca7750922da7da66d3211f3e
Diffstat (limited to 'src/caja-zoom-control.c')
-rw-r--r--src/caja-zoom-control.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/caja-zoom-control.c b/src/caja-zoom-control.c
index 685242dc..1b251da2 100644
--- a/src/caja-zoom-control.c
+++ b/src/caja-zoom-control.c
@@ -44,6 +44,10 @@
#include <stdlib.h>
#include <string.h>
+#if !GTK_CHECK_VERSION(3,0,0)
+#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y)
+#endif
+
enum
{
ZOOM_IN,
@@ -153,8 +157,8 @@ menu_position_under_widget (GtkMenu *menu,
container = gtk_widget_get_ancestor (widget, GTK_TYPE_CONTAINER);
g_assert (container != NULL);
- gtk_widget_size_request (widget, &req);
- gtk_widget_size_request (GTK_WIDGET (menu), &menu_req);
+ gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_req, NULL);
+ gtk_widget_get_preferred_size (widget, &req, NULL);
gtk_widget_get_allocation (widget, &allocation);
screen = gtk_widget_get_screen (GTK_WIDGET (menu));