summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAntónio Fernandes <antoniof@gnome.org>2021-02-07 00:38:13 +0000
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2021-02-08 11:46:02 +0000
commit127c7968c2d2cd911c2ea2bd9823eaa8ce926b44 (patch)
tree9a8f6178a0b9a200135191f6bdc5007d9a5f9d5f /src
parente12fff1077e6306093e2e394e8e03e6bb4250a21 (diff)
downloadnautilus-127c7968c2d2cd911c2ea2bd9823eaa8ce926b44.tar.gz
preferences-window: Drop default columns tab
Unlike most preferences, changing this may have no effect on open windows, which is unexpected. This affects only new folders without any per-folder override, which has diminute value. Remove this from the Preferences window. The gsettings key is preserved. Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1312 First part of https://gitlab.gnome.org/GNOME/nautilus/-/issues/1703
Diffstat (limited to 'src')
-rw-r--r--src/nautilus-preferences-window.c70
-rw-r--r--src/resources/ui/nautilus-preferences-window.ui79
2 files changed, 0 insertions, 149 deletions
diff --git a/src/nautilus-preferences-window.c b/src/nautilus-preferences-window.c
index cbcf2aca6..2787138fa 100644
--- a/src/nautilus-preferences-window.c
+++ b/src/nautilus-preferences-window.c
@@ -97,26 +97,6 @@ static const char * const icon_captions_components[] =
static GtkWidget *preferences_window = NULL;
-static void columns_changed_callback(NautilusColumnChooser *chooser,
- gpointer callback_data)
-{
- char **visible_columns;
- char **column_order;
-
- nautilus_column_chooser_get_settings (NAUTILUS_COLUMN_CHOOSER (chooser),
- &visible_columns, &column_order);
-
- g_settings_set_strv (nautilus_list_view_preferences,
- NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS,
- (const char * const *) visible_columns);
- g_settings_set_strv (nautilus_list_view_preferences,
- NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER,
- (const char * const *) column_order);
-
- g_strfreev (visible_columns);
- g_strfreev (column_order);
-}
-
static void free_column_names_array(GPtrArray *column_names)
{
g_ptr_array_foreach (column_names, (GFunc) g_free, NULL);
@@ -289,55 +269,6 @@ nautilus_preferences_window_setup_icon_caption_page (GtkBuilder *builder)
update_icon_captions_from_settings (builder);
}
-static void set_columns_from_settings(NautilusColumnChooser *chooser)
-{
- char **visible_columns;
- char **column_order;
-
- visible_columns = g_settings_get_strv (
- nautilus_list_view_preferences,
- NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS);
- column_order =
- g_settings_get_strv (nautilus_list_view_preferences,
- NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER);
-
- nautilus_column_chooser_set_settings (NAUTILUS_COLUMN_CHOOSER (chooser),
- visible_columns, column_order);
-
- g_strfreev (visible_columns);
- g_strfreev (column_order);
-}
-
-static void use_default_callback(NautilusColumnChooser *chooser,
- gpointer user_data)
-{
- g_settings_reset (nautilus_list_view_preferences,
- NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS);
- g_settings_reset (nautilus_list_view_preferences,
- NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER);
- set_columns_from_settings (chooser);
-}
-
-static void
-nautilus_preferences_window_setup_list_column_page (GtkBuilder *builder)
-{
- GtkWidget *chooser;
- GtkWidget *box;
-
- chooser = nautilus_column_chooser_new (NULL);
- g_signal_connect (chooser, "changed", G_CALLBACK (columns_changed_callback),
- chooser);
- g_signal_connect (chooser, "use-default", G_CALLBACK (use_default_callback),
- chooser);
-
- set_columns_from_settings (NAUTILUS_COLUMN_CHOOSER (chooser));
-
- gtk_widget_show (chooser);
- box = GTK_WIDGET (gtk_builder_get_object (builder, "list_columns_vbox"));
-
- gtk_box_pack_start (GTK_BOX (box), chooser, TRUE, TRUE, 0);
-}
-
static void bind_builder_bool(GtkBuilder *builder,
GSettings *settings,
const char *widget_name,
@@ -438,7 +369,6 @@ static void nautilus_preferences_window_setup(GtkBuilder *builder,
(const char **) speed_tradeoff_values);
nautilus_preferences_window_setup_icon_caption_page (builder);
- nautilus_preferences_window_setup_list_column_page (builder);
/* UI callbacks */
window = GTK_WIDGET (gtk_builder_get_object (builder, "preferences_window"));
diff --git a/src/resources/ui/nautilus-preferences-window.ui b/src/resources/ui/nautilus-preferences-window.ui
index c1ba7b603..67103ed95 100644
--- a/src/resources/ui/nautilus-preferences-window.ui
+++ b/src/resources/ui/nautilus-preferences-window.ui
@@ -609,85 +609,6 @@
</packing>
</child>
<child>
- <object class="GtkBox" id="vbox29">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">12</property>
- <property name="orientation">vertical</property>
- <property name="spacing">18</property>
- <child>
- <object class="GtkBox" id="vbox30">
- <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="list_columns_vbox">
- <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="label_choose_order">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Choose the order of information to appear in the list view.</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">65</property>
- <property name="xalign">0</property>
- <accessibility>
- <relation type="label-for" target="list_columns_vbox"/>
- </accessibility>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <accessibility>
- <relation type="labelled-by" target="label_choose_order"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="list_columns_vbox-atkobject">
- <property name="AtkObject::accessible-role">panel</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_expand">True</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label_list_columns">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">List Columns</property>
- </object>
- <packing>
- <property name="position">2</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- <child>
<object class="GtkBox" id="vbox9">
<property name="visible">True</property>
<property name="can_focus">False</property>