diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/caja-file-management-properties.c | 14 | ||||
-rw-r--r-- | src/file-manager/fm-icon-view.c | 29 |
2 files changed, 26 insertions, 17 deletions
diff --git a/src/caja-file-management-properties.c b/src/caja-file-management-properties.c index a63ea744..4ac3121d 100644 --- a/src/caja-file-management-properties.c +++ b/src/caja-file-management-properties.c @@ -966,9 +966,9 @@ caja_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow *wi bind_builder_bool (builder, caja_icon_view_preferences, CAJA_FILE_MANAGEMENT_PROPERTIES_LABELS_BESIDE_ICONS_WIDGET, CAJA_PREFERENCES_ICON_VIEW_LABELS_BESIDE_ICONS); - eel_preferences_builder_connect_bool (builder, - CAJA_FILE_MANAGEMENT_PROPERTIES_ALL_COLUMNS_SAME_WIDTH, - CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH); + bind_builder_bool (builder, caja_compact_view_preferences, + CAJA_FILE_MANAGEMENT_PROPERTIES_ALL_COLUMNS_SAME_WIDTH, + CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH); bind_builder_bool (builder, caja_preferences, CAJA_FILE_MANAGEMENT_PROPERTIES_FOLDERS_FIRST_WIDGET, CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST); @@ -1005,10 +1005,10 @@ caja_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow *wi CAJA_FILE_MANAGEMENT_PROPERTIES_ICON_VIEW_ZOOM_WIDGET, CAJA_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL, (const char **) zoom_values); - eel_preferences_builder_connect_string_enum_combo_box (builder, - CAJA_FILE_MANAGEMENT_PROPERTIES_COMPACT_VIEW_ZOOM_WIDGET, - CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL, - (const char **) zoom_values); + bind_builder_enum (builder, caja_compact_view_preferences, + CAJA_FILE_MANAGEMENT_PROPERTIES_COMPACT_VIEW_ZOOM_WIDGET, + CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL, + (const char **) zoom_values); eel_preferences_builder_connect_string_enum_combo_box (builder, CAJA_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_ZOOM_WIDGET, CAJA_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL, diff --git a/src/file-manager/fm-icon-view.c b/src/file-manager/fm-icon-view.c index 3c70b2da..1e643bb2 100644 --- a/src/file-manager/fm-icon-view.c +++ b/src/file-manager/fm-icon-view.c @@ -201,6 +201,7 @@ static void default_use_tighter_layout_changed_callback (gpointer callback_da static void default_use_manual_layout_changed_callback (gpointer callback_data); static void default_zoom_level_changed_callback (gpointer callback_data); static void labels_beside_icons_changed_callback (gpointer callback_data); +static void all_columns_same_width_changed_callback (gpointer callback_data); static void fm_icon_view_iface_init (CajaViewIface *iface); @@ -268,7 +269,12 @@ fm_icon_view_finalize (GObject *object) g_signal_handlers_disconnect_by_func (caja_icon_view_preferences, labels_beside_icons_changed_callback, icon_view); - + g_signal_handlers_disconnect_by_func (caja_compact_view_preferences, + default_zoom_level_changed_callback, + icon_view); + g_signal_handlers_disconnect_by_func (caja_compact_view_preferences, + all_columns_same_width_changed_callback, + icon_view); G_OBJECT_CLASS (fm_icon_view_parent_class)->finalize (object); } @@ -1237,8 +1243,9 @@ get_default_zoom_level (FMIconView *icon_view) eel_g_settings_add_auto_enum (caja_icon_view_preferences, CAJA_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL, (int *) &default_zoom_level); - eel_preferences_add_auto_enum (CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL, - (int *) &default_compact_zoom_level); + eel_g_settings_add_auto_enum (caja_compact_view_preferences, + CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL, + (int *) &default_compact_zoom_level); } return CLAMP (DEFAULT_ZOOM_LEVEL(icon_view), CAJA_ZOOM_LEVEL_SMALLEST, CAJA_ZOOM_LEVEL_LARGEST); @@ -1276,7 +1283,7 @@ set_columns_same_width (FMIconView *icon_view) if (fm_icon_view_is_compact (icon_view)) { - all_columns_same_width = eel_preferences_get_boolean (CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH); + all_columns_same_width = g_settings_get_boolean (caja_compact_view_preferences, CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH); caja_icon_container_set_all_columns_same_width (get_icon_container (icon_view), all_columns_same_width); } } @@ -3344,12 +3351,14 @@ fm_icon_view_init (FMIconView *icon_view) G_CALLBACK (labels_beside_icons_changed_callback), icon_view); - eel_preferences_add_callback_while_alive (CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL, - default_zoom_level_changed_callback, - icon_view, G_OBJECT (icon_view)); - eel_preferences_add_callback_while_alive (CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH, - all_columns_same_width_changed_callback, - icon_view, G_OBJECT (icon_view)); + g_signal_connect_swapped (caja_compact_view_preferences, + "changed::" CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL, + G_CALLBACK (default_zoom_level_changed_callback), + icon_view); + g_signal_connect_swapped (caja_compact_view_preferences, + "changed::" CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH, + G_CALLBACK (all_columns_same_width_changed_callback), + icon_view); g_signal_connect_object (get_icon_container (icon_view), "handle_netscape_url", G_CALLBACK (icon_view_handle_netscape_url), icon_view, 0); |