view: Make the zoom slider the preference itself

With the recent changes of the zoom, some people wanted to
have by default the smaller zoom level. They changed the slider
and expected to set the setting as well, so further applications
openings had that zoom level.

But changed on the zoom were intended only for the current view
and not altering the preference. And instead, if you wanted to
make it permanent you needed to go to Preferences and change it there.

Seems that was confusing for the users, so instead use the slider
as the permanent preference and remove the zoom preferences from
the Preferences dialog.
parent 9f92f73e
...@@ -968,6 +968,9 @@ action_zoom_to_level (GSimpleAction *action, ...@@ -968,6 +968,9 @@ action_zoom_to_level (GSimpleAction *action,
nautilus_canvas_view_zoom_to_level (view, zoom_level); nautilus_canvas_view_zoom_to_level (view, zoom_level);
g_simple_action_set_state (G_SIMPLE_ACTION (action), state); g_simple_action_set_state (G_SIMPLE_ACTION (action), state);
g_settings_set_enum (nautilus_icon_view_preferences,
NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL,
zoom_level);
} }
static void static void
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
/* string enum preferences */ /* string enum preferences */
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET "default_view_combobox" #define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET "default_view_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_ICON_VIEW_ZOOM_WIDGET "icon_view_zoom_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_ZOOM_WIDGET "list_view_zoom_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SORT_ORDER_WIDGET "sort_order_combobox" #define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SORT_ORDER_WIDGET "sort_order_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_PREVIEW_FILES_WIDGET "preview_image_combobox" #define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_PREVIEW_FILES_WIDGET "preview_image_combobox"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_PREVIEW_FOLDER_WIDGET "preview_folder_combobox" #define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_PREVIEW_FOLDER_WIDGET "preview_folder_combobox"
...@@ -62,13 +60,6 @@ static const char * const default_view_values[] = { ...@@ -62,13 +60,6 @@ static const char * const default_view_values[] = {
NULL NULL
}; };
static const char * const zoom_values[] = {
"small",
"standard",
"large",
NULL
};
static const char * const sort_order_values[] = { static const char * const sort_order_values[] = {
"name", "name",
"size", "size",
...@@ -591,7 +582,7 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow ...@@ -591,7 +582,7 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
/* setup UI */ /* setup UI */
nautilus_file_management_properties_size_group_create (builder, nautilus_file_management_properties_size_group_create (builder,
"views_label", "views_label",
4); 2);
nautilus_file_management_properties_size_group_create (builder, nautilus_file_management_properties_size_group_create (builder,
"captions_label", "captions_label",
3); 3);
...@@ -621,14 +612,6 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow ...@@ -621,14 +612,6 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET, NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET,
NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER, NAUTILUS_PREFERENCES_DEFAULT_FOLDER_VIEWER,
(const char **) default_view_values); (const char **) default_view_values);
bind_builder_enum (builder, nautilus_icon_view_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_ICON_VIEW_ZOOM_WIDGET,
NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL,
(const char **) zoom_values);
bind_builder_enum (builder, nautilus_list_view_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_ZOOM_WIDGET,
NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
(const char **) zoom_values);
bind_builder_enum (builder, nautilus_preferences, bind_builder_enum (builder, nautilus_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SORT_ORDER_WIDGET, NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SORT_ORDER_WIDGET,
NAUTILUS_PREFERENCES_DEFAULT_SORT_ORDER, NAUTILUS_PREFERENCES_DEFAULT_SORT_ORDER,
......
...@@ -212,194 +212,6 @@ ...@@ -212,194 +212,6 @@
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox" id="vbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Icon View Defaults</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="vbox16">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="hbox35">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="views_label_2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Default _zoom level:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">icon_view_zoom_combobox</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="icon_view_zoom_combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">icon_view_zoom_levels</property>
<child>
<object class="GtkCellRendererText" id="renderer3"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">List View Defaults</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkBox" id="vbox15">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkBox" id="hbox36">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="views_label_3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">D_efault zoom level:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">list_view_zoom_combobox</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBox" id="list_view_zoom_combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">list_view_zoom_levels</property>
<child>
<object class="GtkCellRendererText" id="renderer5"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="tab_expand">True</property> <property name="tab_expand">True</property>
......
...@@ -2871,6 +2871,9 @@ action_zoom_to_level (GSimpleAction *action, ...@@ -2871,6 +2871,9 @@ action_zoom_to_level (GSimpleAction *action,
nautilus_list_view_zoom_to_level (view, zoom_level); nautilus_list_view_zoom_to_level (view, zoom_level);
g_simple_action_set_state (G_SIMPLE_ACTION (action), state); g_simple_action_set_state (G_SIMPLE_ACTION (action), state);
g_settings_set_enum (nautilus_list_view_preferences,
NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
zoom_level);
} }
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment