diff options
author | Stefano Karapetsas <[email protected]> | 2012-09-05 12:36:04 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-09-05 12:36:04 +0200 |
commit | 6f15dc7cc1be8b98bbc1f5edd963ff89076295ee (patch) | |
tree | 04a0b2971e10ce57880360f63147b2d137b84b2a /src/caja-navigation-window.c | |
parent | 373da58a33a4242f3d91771fd304ba8bb3d55e61 (diff) | |
download | caja-6f15dc7cc1be8b98bbc1f5edd963ff89076295ee.tar.bz2 caja-6f15dc7cc1be8b98bbc1f5edd963ff89076295ee.tar.xz |
start migration to gsettings
Diffstat (limited to 'src/caja-navigation-window.c')
-rw-r--r-- | src/caja-navigation-window.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/caja-navigation-window.c b/src/caja-navigation-window.c index ee6de1c1..7043e2d7 100644 --- a/src/caja-navigation-window.c +++ b/src/caja-navigation-window.c @@ -89,7 +89,6 @@ enum ARG_APP }; -static int side_pane_width_auto_value = 0; /* Forward and back buttons on the mouse */ @@ -382,11 +381,11 @@ side_pane_size_allocate_callback (GtkWidget *widget, if (allocation->width != window->details->side_pane_width) { window->details->side_pane_width = allocation->width; - if (eel_preferences_key_is_writable (CAJA_PREFERENCES_SIDEBAR_WIDTH)) + if (g_settings_is_writable (caja_preferences, CAJA_PREFERENCES_SIDEBAR_WIDTH)) { - eel_preferences_set_integer - (CAJA_PREFERENCES_SIDEBAR_WIDTH, - allocation->width <= 1 ? 0 : allocation->width); + g_settings_set_int (caja_preferences, + CAJA_PREFERENCES_SIDEBAR_WIDTH, + allocation->width <= 1 ? 0 : allocation->width); } } } @@ -394,22 +393,14 @@ side_pane_size_allocate_callback (GtkWidget *widget, static void setup_side_pane_width (CajaNavigationWindow *window) { - static gboolean setup_auto_value= TRUE; - g_return_if_fail (window->sidebar != NULL); - if (setup_auto_value) - { - setup_auto_value = FALSE; - eel_preferences_add_auto_integer - (CAJA_PREFERENCES_SIDEBAR_WIDTH, - &side_pane_width_auto_value); - } - - window->details->side_pane_width = side_pane_width_auto_value; + window->details->side_pane_width = + g_settings_get_int (caja_preferences, + CAJA_PREFERENCES_SIDEBAR_WIDTH); gtk_paned_set_position (GTK_PANED (window->details->content_paned), - side_pane_width_auto_value); + window->details->side_pane_width); } static void |