diff options
author | Stefano Karapetsas <[email protected]> | 2012-11-16 05:08:48 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-11-16 05:08:48 -0800 |
commit | dc66bc40724191f0068869773576dc4edf042c6f (patch) | |
tree | 74b9684feea188736b21f2c829f29befaaf2e9da /src/caja-side-pane.c | |
parent | 935e1fed604f48e68d125d205c890a59f46f8f21 (diff) | |
parent | 1466df20591105550738a1d0784a623af9909abf (diff) | |
download | caja-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-side-pane.c')
-rw-r--r-- | src/caja-side-pane.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/caja-side-pane.c b/src/caja-side-pane.c index 0566e81d..d3922b9f 100644 --- a/src/caja-side-pane.c +++ b/src/caja-side-pane.c @@ -30,6 +30,10 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> +#if !GTK_CHECK_VERSION(3,0,0) +#define gtk_widget_get_preferred_size(x,y,z) gtk_widget_size_request(x,y) +#endif + typedef struct { char *title; @@ -146,7 +150,7 @@ caja_side_pane_size_allocate (GtkWidget *widget, frame = pane->details->title_frame; hbox = pane->details->title_hbox; - gtk_widget_get_child_requisition (hbox, &child_requisition); + gtk_widget_get_preferred_size (hbox, &child_requisition, NULL); width = child_requisition.width; gtk_widget_get_allocation (frame, &frame_allocation); @@ -249,7 +253,7 @@ select_button_press_callback (GtkWidget *widget, gtk_widget_get_allocation (widget, &allocation); width = allocation.width; gtk_widget_set_size_request (side_pane->details->menu, -1, -1); - gtk_widget_size_request (side_pane->details->menu, &requisition); + gtk_widget_get_preferred_size (side_pane->details->menu, &requisition, NULL); gtk_widget_set_size_request (side_pane->details->menu, MAX (width, requisition.width), -1); @@ -274,10 +278,10 @@ select_button_key_press_callback (GtkWidget *widget, side_pane = CAJA_SIDE_PANE (user_data); - if (event->keyval == GDK_space || - event->keyval == GDK_KP_Space || - event->keyval == GDK_Return || - event->keyval == GDK_KP_Enter) + if (event->keyval == GDK_KEY_space || + event->keyval == GDK_KEY_KP_Space || + event->keyval == GDK_KEY_Return || + event->keyval == GDK_KEY_KP_Enter) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); gtk_menu_popup (GTK_MENU (side_pane->details->menu), |