summaryrefslogtreecommitdiff
path: root/src/caja-zoom-control.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-11-16 05:08:48 -0800
committerStefano Karapetsas <[email protected]>2012-11-16 05:08:48 -0800
commitdc66bc40724191f0068869773576dc4edf042c6f (patch)
tree74b9684feea188736b21f2c829f29befaaf2e9da /src/caja-zoom-control.c
parent935e1fed604f48e68d125d205c890a59f46f8f21 (diff)
parent1466df20591105550738a1d0784a623af9909abf (diff)
downloadcaja-dc66bc40724191f0068869773576dc4edf042c6f.tar.bz2
caja-dc66bc40724191f0068869773576dc4edf042c6f.tar.xz
Merge pull request #42 from jasmineaura/develop
Bring Caja up to speed, stage1
Diffstat (limited to 'src/caja-zoom-control.c')
-rw-r--r--src/caja-zoom-control.c21
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);