diff options
author | Jasmine Hassan <[email protected]> | 2012-11-08 01:03:47 +0200 |
---|---|---|
committer | Jasmine Hassan <[email protected]> | 2012-11-16 09:45:52 +0200 |
commit | 48d2f19ea2b821d1f3b3017afc912154ab2ee7da (patch) | |
tree | 599e2a5998d582176ca84f7abf30f88c600705fc /src/caja-spatial-window.c | |
parent | e5b2fbf43e1c1ad5552abb004e5ebc4beb17ce2c (diff) | |
download | caja-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-spatial-window.c')
-rw-r--r-- | src/caja-spatial-window.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/caja-spatial-window.c b/src/caja-spatial-window.c index 161a3038..524fbb9b 100644 --- a/src/caja-spatial-window.c +++ b/src/caja-spatial-window.c @@ -64,6 +64,10 @@ #include <libcaja-private/caja-search-engine.h> #include <libcaja-private/caja-signaller.h> +#if !GTK_CHECK_VERSION(3,0,0) +#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y) +#endif + #define MAX_TITLE_LENGTH 180 #define MAX_SHORTNAME_PATH 16 @@ -632,8 +636,8 @@ menu_popup_pos (GtkMenu *menu, widget = user_data; - gtk_widget_size_request (GTK_WIDGET (menu), &menu_requisition); - gtk_widget_size_request (widget, &button_requisition); + gtk_widget_get_preferred_size (GTK_WIDGET (menu), &menu_requisition, NULL); + gtk_widget_get_preferred_size (widget, &button_requisition, NULL); gtk_widget_get_allocation (widget, &allocation); gdk_window_get_origin (gtk_widget_get_window (widget), x, y); |