summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcaja-private/caja-global-preferences.c7
-rw-r--r--libcaja-private/caja-global-preferences.h3
-rw-r--r--src/caja-file-management-properties.c6
-rw-r--r--src/file-manager/fm-tree-view.c12
4 files changed, 14 insertions, 14 deletions
diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c
index 94da8a82..b0a7e765 100644
--- a/libcaja-private/caja-global-preferences.c
+++ b/libcaja-private/caja-global-preferences.c
@@ -164,12 +164,6 @@ typedef struct
*/
static const PreferenceDefault preference_defaults[] =
{
- {
- CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES,
- PREFERENCE_BOOLEAN,
- GINT_TO_POINTER (TRUE)
- },
-
/* Compact Icon View Default Preferences */
{
CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL,
@@ -429,6 +423,7 @@ caja_global_preferences_init (void)
caja_window_state = g_settings_new("org.mate.caja.window-state");
caja_icon_view_preferences = g_settings_new("org.mate.caja.icon-view");
caja_desktop_preferences = g_settings_new("org.mate.caja.desktop");
+ caja_tree_sidebar_preferences = g_settings_new("org.mate.caja.sidebar-panels.tree");
/* Set up storage for values accessed in this file */
g_signal_connect_swapped (caja_icon_view_preferences,
diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h
index 73c67552..e0c9d566 100644
--- a/libcaja-private/caja-global-preferences.h
+++ b/libcaja-private/caja-global-preferences.h
@@ -88,7 +88,7 @@ G_BEGIN_DECLS
} CajaNewTabPosition;
/* Sidebar panels */
-#define CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES "sidebar_panels/tree/show_only_directories"
+#define CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES "show-only-directories"
/* Single/Double click preference */
#define CAJA_PREFERENCES_CLICK_POLICY "click-policy"
@@ -231,6 +231,7 @@ GSettings *caja_media_preferences;
GSettings *caja_window_state;
GSettings *caja_icon_view_preferences;
GSettings *caja_desktop_preferences;
+GSettings *caja_tree_sidebar_preferences;
G_END_DECLS
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c
index f035c8ef..a63ea744 100644
--- a/src/caja-file-management-properties.c
+++ b/src/caja-file-management-properties.c
@@ -993,9 +993,9 @@ caja_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow *wi
bind_builder_bool (builder, caja_preferences,
CAJA_FILE_MANAGEMENT_PROPERTIES_SHOW_HIDDEN_WIDGET,
CAJA_PREFERENCES_SHOW_HIDDEN_FILES);
- eel_preferences_builder_connect_bool (builder,
- CAJA_FILE_MANAGEMENT_PROPERTIES_TREE_VIEW_FOLDERS_WIDGET,
- CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES);
+ bind_builder_bool (builder, caja_tree_sidebar_preferences,
+ CAJA_FILE_MANAGEMENT_PROPERTIES_TREE_VIEW_FOLDERS_WIDGET,
+ CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES);
bind_builder_enum (builder, caja_preferences,
CAJA_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET,
diff --git a/src/file-manager/fm-tree-view.c b/src/file-manager/fm-tree-view.c
index d56f5a6e..c7fa3d21 100644
--- a/src/file-manager/fm-tree-view.c
+++ b/src/file-manager/fm-tree-view.c
@@ -1542,7 +1542,7 @@ update_filtering_from_preferences (FMTreeView *view)
}
fm_tree_model_set_show_only_directories
(view->details->child_model,
- eel_preferences_get_boolean (CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES));
+ g_settings_get_boolean (caja_tree_sidebar_preferences, CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES));
}
static void
@@ -1603,9 +1603,9 @@ fm_tree_view_init (FMTreeView *view)
"changed::" CAJA_PREFERENCES_SHOW_HIDDEN_FILES,
G_CALLBACK(filtering_changed_callback),
view);
- eel_preferences_add_callback_while_alive (CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES,
- filtering_changed_callback, view, G_OBJECT (view));
-
+ g_signal_connect_swapped (caja_tree_sidebar_preferences,
+ "changed::" CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES,
+ G_CALLBACK (filtering_changed_callback), view);
view->details->popup_file = NULL;
view->details->clipboard_handler_id =
@@ -1682,6 +1682,10 @@ fm_tree_view_dispose (GObject *object)
G_CALLBACK(filtering_changed_callback),
view);
+ g_signal_handlers_disconnect_by_func (caja_tree_sidebar_preferences,
+ G_CALLBACK(filtering_changed_callback),
+ view);
+
view->details->window = NULL;
G_OBJECT_CLASS (parent_class)->dispose (object);