From bf5ae0b15f125d949e4e8cc2a52abb94f809dc94 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Wed, 5 Sep 2012 15:57:35 +0200 Subject: convert window-state to gsettings --- libcaja-private/caja-global-preferences.c | 36 +------------------------------ libcaja-private/caja-global-preferences.h | 21 +++++++++--------- 2 files changed, 11 insertions(+), 46 deletions(-) (limited to 'libcaja-private') diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c index 69ddefa3..ce9336b7 100644 --- a/libcaja-private/caja-global-preferences.c +++ b/libcaja-private/caja-global-preferences.c @@ -267,41 +267,6 @@ static const PreferenceDefault preference_defaults[] = NULL, NULL, NULL }, - { - CAJA_PREFERENCES_START_WITH_TOOLBAR, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_START_WITH_LOCATION_BAR, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, - { - CAJA_PREFERENCES_START_WITH_STATUS_BAR, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_START_WITH_SIDEBAR, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (TRUE) - }, - { - CAJA_PREFERENCES_NAVIGATION_WINDOW_SAVED_GEOMETRY, - PREFERENCE_STRING, - "" - }, - { - CAJA_PREFERENCES_NAVIGATION_WINDOW_MAXIMIZED, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, { CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES, PREFERENCE_BOOLEAN, @@ -727,6 +692,7 @@ caja_global_preferences_init (void) caja_preferences = g_settings_new("org.mate.caja.preferences"); caja_media_preferences = g_settings_new("org.mate.media-handling"); + caja_window_state = g_settings_new("org.mate.caja.window-state"); /* Set up storage for values accessed in this file */ eel_preferences_add_callback (CAJA_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER_OR_MANUAL_LAYOUT, diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h index 6d149747..99a1edc8 100644 --- a/libcaja-private/caja-global-preferences.h +++ b/libcaja-private/caja-global-preferences.h @@ -44,9 +44,6 @@ G_BEGIN_DECLS #define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_COLOR "side-pane-background-color" #define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_URI "side-pane-background-uri" - /* How wide the sidebar is (or how wide it will be when expanded) */ -#define CAJA_PREFERENCES_SIDEBAR_WIDTH "sidebar-width" - /* Automount options */ #define CAJA_PREFERENCES_MEDIA_AUTOMOUNT "media-automount" #define CAJA_PREFERENCES_MEDIA_AUTOMOUNT_OPEN "media-automount-open" @@ -105,16 +102,17 @@ G_BEGIN_DECLS /* Spatial or browser mode */ #define CAJA_PREFERENCES_ALWAYS_USE_BROWSER "always-use-browser" #define CAJA_PREFERENCES_NEW_TAB_POSITION "tabs-open-position" +#define CAJA_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY "always-use-location-entry" /* Which views should be displayed for new windows */ -#define CAJA_PREFERENCES_START_WITH_LOCATION_BAR "preferences/start_with_location_bar" -#define CAJA_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY "preferences/always_use_location_entry" -#define CAJA_PREFERENCES_START_WITH_STATUS_BAR "preferences/start_with_status_bar" -#define CAJA_PREFERENCES_START_WITH_SIDEBAR "preferences/start_with_sidebar" -#define CAJA_PREFERENCES_START_WITH_TOOLBAR "preferences/start_with_toolbar" -#define CAJA_PREFERENCES_SIDE_PANE_VIEW "preferences/side_pane_view" -#define CAJA_PREFERENCES_NAVIGATION_WINDOW_SAVED_GEOMETRY "preferences/navigation_window_saved_geometry" -#define CAJA_PREFERENCES_NAVIGATION_WINDOW_MAXIMIZED "preferences/navigation_window_saved_maximized" +#define CAJA_WINDOW_STATE_START_WITH_LOCATION_BAR "start-with-location-bar" +#define CAJA_WINDOW_STATE_START_WITH_STATUS_BAR "start-with-status-bar" +#define CAJA_WINDOW_STATE_START_WITH_SIDEBAR "start-with-sidebar" +#define CAJA_WINDOW_STATE_START_WITH_TOOLBAR "start-with-toolbar" +#define CAJA_WINDOW_STATE_SIDE_PANE_VIEW "side-pane-view" +#define CAJA_WINDOW_STATE_GEOMETRY "geometry" +#define CAJA_WINDOW_STATE_MAXIMIZED "maximized" +#define CAJA_WINDOW_STATE_SIDEBAR_WIDTH "sidebar-width" /* Sorting order */ #define CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST "preferences/sort_directories_first" @@ -233,6 +231,7 @@ char *caja_global_preferences_get_default_folder_viewer_preference_as_iid (void) GSettings *caja_preferences; GSettings *caja_media_preferences; +GSettings *caja_window_state; G_END_DECLS -- cgit v1.2.1