diff options
-rw-r--r-- | libcaja-private/caja-global-preferences.c | 5 | ||||
-rw-r--r-- | libcaja-private/caja-global-preferences.h | 2 | ||||
-rw-r--r-- | src/caja-file-management-properties.c | 6 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 14 |
4 files changed, 12 insertions, 15 deletions
diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c index ce9336b7..5df398bc 100644 --- a/libcaja-private/caja-global-preferences.c +++ b/libcaja-private/caja-global-preferences.c @@ -249,11 +249,6 @@ static const PreferenceDefault preference_defaults[] = "speed_tradeoff" }, { - CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST, - PREFERENCE_BOOLEAN, - GINT_TO_POINTER (FALSE) - }, - { CAJA_PREFERENCES_SEARCH_BAR_TYPE, PREFERENCE_STRING, "search_by_text", diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h index 99a1edc8..c9d1bbfc 100644 --- a/libcaja-private/caja-global-preferences.h +++ b/libcaja-private/caja-global-preferences.h @@ -115,7 +115,7 @@ G_BEGIN_DECLS #define CAJA_WINDOW_STATE_SIDEBAR_WIDTH "sidebar-width" /* Sorting order */ -#define CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST "preferences/sort_directories_first" +#define CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST "sort-directories-first" /* The default folder viewer - one of the two enums below */ #define CAJA_PREFERENCES_DEFAULT_FOLDER_VIEWER "preferences/default_folder_viewer" diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c index 9293f714..66a0c72d 100644 --- a/src/caja-file-management-properties.c +++ b/src/caja-file-management-properties.c @@ -907,9 +907,9 @@ caja_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow *wi eel_preferences_builder_connect_bool (builder, CAJA_FILE_MANAGEMENT_PROPERTIES_ALL_COLUMNS_SAME_WIDTH, CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH); - eel_preferences_builder_connect_bool (builder, - CAJA_FILE_MANAGEMENT_PROPERTIES_FOLDERS_FIRST_WIDGET, - CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST); + bind_builder_bool (builder, caja_preferences, + CAJA_FILE_MANAGEMENT_PROPERTIES_FOLDERS_FIRST_WIDGET, + CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST); bind_builder_bool_inverted (builder, caja_preferences, CAJA_FILE_MANAGEMENT_PROPERTIES_ALWAYS_USE_BROWSER_WIDGET, CAJA_PREFERENCES_ALWAYS_USE_BROWSER); diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c index 1ee8e12f..c12cb3aa 100644 --- a/src/file-manager/fm-directory-view.c +++ b/src/file-manager/fm-directory-view.c @@ -1625,7 +1625,7 @@ sort_directories_first_changed_callback (gpointer callback_data) view = FM_DIRECTORY_VIEW (callback_data); preference_value = - eel_preferences_get_boolean (CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST); + g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST); if (preference_value != view->details->sort_directories_first) { view->details->sort_directories_first = preference_value; @@ -2024,7 +2024,7 @@ fm_directory_view_init (FMDirectoryView *view) view, G_CONNECT_SWAPPED); view->details->sort_directories_first = - eel_preferences_get_boolean (CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST); + g_settings_get_boolean (caja_preferences, CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST); g_signal_connect_object (caja_trash_monitor_get (), "trash_state_changed", G_CALLBACK (fm_directory_view_trash_state_changed_callback), view, 0); @@ -2049,8 +2049,10 @@ fm_directory_view_init (FMDirectoryView *view) "changed::" CAJA_PREFERENCES_CLICK_POLICY, G_CALLBACK(click_policy_changed_callback), view); - eel_preferences_add_callback (CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST, - sort_directories_first_changed_callback, view); + g_signal_connect_swapped (caja_preferences, + "changed::" CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST, + G_CALLBACK(sort_directories_first_changed_callback), + view); eel_preferences_add_callback (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE, lockdown_disable_command_line_changed_callback, view); @@ -2178,8 +2180,8 @@ fm_directory_view_finalize (GObject *object) image_display_policy_changed_callback, view); g_signal_handlers_disconnect_by_func (caja_preferences, click_policy_changed_callback, view); - eel_preferences_remove_callback (CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST, - sort_directories_first_changed_callback, view); + g_signal_handlers_disconnect_by_func (caja_preferences, + sort_directories_first_changed_callback, view); eel_preferences_remove_callback (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE, lockdown_disable_command_line_changed_callback, view); |