diff options
author | Stefano Karapetsas <[email protected]> | 2012-09-05 16:17:30 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-09-05 16:17:30 +0200 |
commit | 3f1231c4539d2dfb3620b89e978157be6302ef53 (patch) | |
tree | 128b79a7607af7b5b6f7ac6aa86f92ccb453face /src | |
parent | bf5ae0b15f125d949e4e8cc2a52abb94f809dc94 (diff) | |
download | caja-3f1231c4539d2dfb3620b89e978157be6302ef53.tar.bz2 caja-3f1231c4539d2dfb3620b89e978157be6302ef53.tar.xz |
convert sort-directories-first to gsettings
Diffstat (limited to 'src')
-rw-r--r-- | src/caja-file-management-properties.c | 6 | ||||
-rw-r--r-- | src/file-manager/fm-directory-view.c | 14 |
2 files changed, 11 insertions, 9 deletions
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); |