diff options
Diffstat (limited to 'src/caja-zoom-control.c')
-rw-r--r-- | src/caja-zoom-control.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/caja-zoom-control.c b/src/caja-zoom-control.c index 8ba974c4..1b251da2 100644 --- a/src/caja-zoom-control.c +++ b/src/caja-zoom-control.c @@ -40,11 +40,14 @@ #include <gdk/gdkkeysyms.h> #include <libcaja-private/caja-file-utilities.h> #include <libcaja-private/caja-global-preferences.h> -#include <libcaja-private/caja-marshal.h> #include <math.h> #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, @@ -154,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)); @@ -723,32 +726,32 @@ caja_zoom_control_class_init (CajaZoomControlClass *class) binding_set = gtk_binding_set_by_class (class); gtk_binding_entry_add_signal (binding_set, - GDK_KP_Subtract, 0, + GDK_KEY_KP_Subtract, 0, "change_value", 1, GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN); gtk_binding_entry_add_signal (binding_set, - GDK_minus, 0, + GDK_KEY_minus, 0, "change_value", 1, GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_DOWN); gtk_binding_entry_add_signal (binding_set, - GDK_KP_Equal, 0, + GDK_KEY_KP_Equal, 0, "zoom_to_default", 0); gtk_binding_entry_add_signal (binding_set, - GDK_KP_Equal, 0, + GDK_KEY_KP_Equal, 0, "zoom_to_default", 0); gtk_binding_entry_add_signal (binding_set, - GDK_KP_Add, 0, + GDK_KEY_KP_Add, 0, "change_value", 1, GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP); gtk_binding_entry_add_signal (binding_set, - GDK_plus, 0, + GDK_KEY_plus, 0, "change_value", 1, GTK_TYPE_SCROLL_TYPE, GTK_SCROLL_STEP_UP); |