[nautilus/1309-thumbnails-size-limit-preference-is-misleading-and-the-default-value-is-outdated] preferences-window: Drop image size thumbnail control



commit 4b59c518e385f4f5f330bd8806962bdc9384b5b4
Author: António Fernandes <antoniof gnome org>
Date:   Sat Feb 6 19:35:55 2021 +0000

    preferences-window: Drop image size thumbnail control
    
    It applies only to image files, which is unexpected. The drawbacks of
    setting a higher value are not explained either. How much is too much?
    
    The last commit has raised the default value to a hopefully high
    enough value making this UI control even less useful.
    
    The gsettings key is preserved for now.
    
    https://gitlab.gnome.org/GNOME/nautilus/-/issues/1309

 src/nautilus-preferences-window.c               | 40 ---------------------
 src/resources/ui/nautilus-preferences-window.ui | 48 -------------------------
 2 files changed, 88 deletions(-)
---
diff --git a/src/nautilus-preferences-window.c b/src/nautilus-preferences-window.c
index 477078c16..156d994b2 100644
--- a/src/nautilus-preferences-window.c
+++ b/src/nautilus-preferences-window.c
@@ -63,8 +63,6 @@
     "use_new_views_checkbutton"
 
 /* int enums */
-#define NAUTILUS_PREFERENCES_DIALOG_THUMBNAIL_LIMIT_WIDGET                     \
-    "preview_image_size_spinbutton"
 
 static const char * const speed_tradeoff_values[] =
 {
@@ -342,30 +340,6 @@ nautilus_preferences_window_setup_list_column_page (GtkBuilder *builder)
     gtk_box_pack_start (GTK_BOX (box), chooser, TRUE, TRUE, 0);
 }
 
-static gboolean
-format_spin_button (GtkSpinButton *spin_button,
-                    gpointer       user_data)
-{
-    gint value;
-    gchar *text;
-
-    value = gtk_spin_button_get_value_as_int (spin_button);
-    text = g_strdup_printf (_("%d MB"), value);
-    gtk_entry_set_text (GTK_ENTRY (spin_button), text);
-
-    return TRUE;
-}
-
-static void nautilus_preferences_window_setup_thumbnail_limit_formatting (GtkBuilder *builder)
-{
-    GtkSpinButton *spin;
-
-    spin = GTK_SPIN_BUTTON (gtk_builder_get_object (builder, "preview_image_size_spinbutton"));
-
-    g_signal_connect (spin, "output", G_CALLBACK (format_spin_button),
-                      spin);
-}
-
 static void bind_builder_bool(GtkBuilder *builder,
                               GSettings  *settings,
                               const char *widget_name,
@@ -375,15 +349,6 @@ static void bind_builder_bool(GtkBuilder *builder,
                      "active", G_SETTINGS_BIND_DEFAULT);
 }
 
-static void bind_builder_uint_spin(GtkBuilder *builder,
-                                   GSettings  *settings,
-                                   const char *widget_name,
-                                   const char *prefs)
-{
-    g_settings_bind (settings, prefs, gtk_builder_get_object (builder, widget_name),
-                     "value", G_SETTINGS_BIND_DEFAULT);
-}
-
 static GVariant *radio_mapping_set(const GValue       *gvalue,
                                    const GVariantType *expected_type,
                                    gpointer            user_data)
@@ -477,11 +442,6 @@ static void nautilus_preferences_window_setup(GtkBuilder *builder,
                         NAUTILUS_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS,
                         (const char **) speed_tradeoff_values);
 
-    bind_builder_uint_spin (builder, nautilus_preferences,
-                            NAUTILUS_PREFERENCES_DIALOG_THUMBNAIL_LIMIT_WIDGET,
-                            NAUTILUS_PREFERENCES_FILE_THUMBNAIL_LIMIT);
-
-    nautilus_preferences_window_setup_thumbnail_limit_formatting (builder);
     nautilus_preferences_window_setup_icon_caption_page (builder);
     nautilus_preferences_window_setup_list_column_page (builder);
 
diff --git a/src/resources/ui/nautilus-preferences-window.ui b/src/resources/ui/nautilus-preferences-window.ui
index d538e00c9..a85408d8f 100644
--- a/src/resources/ui/nautilus-preferences-window.ui
+++ b/src/resources/ui/nautilus-preferences-window.ui
@@ -2,12 +2,6 @@
 <!-- Generated with glade 3.22.0 -->
 <interface>
   <requires lib="gtk+" version="3.22"/>
-  <object class="GtkAdjustment" id="adjustment1">
-    <property name="lower">1</property>
-    <property name="upper">4096</property>
-    <property name="step_increment">1</property>
-    <property name="page_increment">10</property>
-  </object>
   <object class="GtkDialog" id="preferences_window">
     <property name="can_focus">False</property>
     <property name="title" translatable="yes">Preferences</property>
@@ -944,48 +938,6 @@
                         <property name="position">4</property>
                       </packing>
                     </child>
-                    <child>
-                      <object class="GtkBox" id="hbox21">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="spacing">12</property>
-                        <child>
-                          <object class="GtkLabel" id="preview_label_1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label" translatable="yes">Onl_y for files smaller 
than:</property>
-                            <property name="use_underline">True</property>
-                            <property name="mnemonic_widget">preview_image_size_spinbutton</property>
-                            <property name="xalign">0</property>
-                          </object>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkSpinButton" id="preview_image_size_spinbutton">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="width_chars">8</property>
-                            <property name="input_purpose">number</property>
-                            <property name="adjustment">adjustment1</property>
-                            <property name="climb_rate">10</property>
-                          </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">5</property>
-                      </packing>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label_show_thumbnails"/>
                     </accessibility>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]