[nautilus/wip/antoniof/flow-box-preparation: 24/25] global-preferences: Remove now-unused preferences




commit f14f830ae69e920efbfef1d9855d90315a84ab39
Author: António Fernandes <antoniof gnome org>
Date:   Sun Dec 12 18:23:34 2021 +0000

    global-preferences: Remove now-unused preferences
    
    With the removal of canvas view, both preferences became meaningless.

 data/org.gnome.nautilus.gschema.xml | 10 ----------
 src/nautilus-dnd.c                  |  7 +------
 src/nautilus-file.c                 |  8 --------
 src/nautilus-files-view.c           | 12 +-----------
 src/nautilus-global-preferences.h   |  6 ------
 src/nautilus-types.h                |  2 --
 src/nautilus-window-slot.c          | 21 ---------------------
 7 files changed, 2 insertions(+), 64 deletions(-)
---
diff --git a/data/org.gnome.nautilus.gschema.xml b/data/org.gnome.nautilus.gschema.xml
index aa4306aea..90f63c488 100644
--- a/data/org.gnome.nautilus.gschema.xml
+++ b/data/org.gnome.nautilus.gschema.xml
@@ -193,11 +193,6 @@
       <summary>Whether to open the hovered folder after a timeout when drag and drop operation</summary>
       <description>If this is set to true, when performing a drag and drop operation the hovered folder will 
open automatically after a timeout.</description>
     </key>
-    <key type="b" name="use-experimental-views">
-      <default>false</default>
-      <summary>Enable new experimental views</summary>
-      <description>Whether to use the new experimental views using the latest GTK+ widgets to help giving 
feedback and shaping their future.</description>
-    </key>
     <key type="b" name="fts-enabled">
       <default>true</default>
       <summary>Whether to have full text search enabled by default when opening a new window/tab</summary>
@@ -223,11 +218,6 @@
       <default>'large'</default>
       <summary>Default icon view zoom level</summary>
     </key>
-    <key type="as" name="text-ellipsis-limit">
-      <default>[ '3' ]</default>
-      <summary>Text Ellipsis Limit</summary>
-      <description>A string specifying how parts of overlong file names should be replaced by ellipses, 
depending on the zoom level. Each of the list entries is of the form “Zoom Level:Integer”. For each specified 
zoom level, if the given integer is larger than 0, the file name will not exceed the given number of lines. 
If the integer is 0 or smaller, no limit is imposed on the specified zoom level. A default entry of the form 
“Integer” without any specified zoom level is also allowed. It defines the maximum number of lines for all 
other zoom levels. Examples: 0 — always display overlong file names; 3 — shorten file names if they exceed 
three lines; smallest:5,smaller:4,0 — shorten file names if they exceed five lines for zoom level “smallest”. 
Shorten file names if they exceed four lines for zoom level “smaller”. Do not shorten file names for other 
zoom levels. Available zoom levels: small, standard, large.</description>
-    </key>
   </schema>
 
   <schema path="/org/gnome/nautilus/list-view/" id="org.gnome.nautilus.list-view" gettext-domain="nautilus">
diff --git a/src/nautilus-dnd.c b/src/nautilus-dnd.c
index 7b7a1ba2b..abef9b002 100644
--- a/src/nautilus-dnd.c
+++ b/src/nautilus-dnd.c
@@ -406,12 +406,7 @@ nautilus_drag_get_source_data (GdkDragContext *context)
         return NULL;
     }
 
-    if (NAUTILUS_IS_CANVAS_CONTAINER (source_widget))
-    {
-        source_data = nautilus_canvas_dnd_get_drag_source_data (NAUTILUS_CANVAS_CONTAINER (source_widget),
-                                                                context);
-    }
-    else if (GTK_IS_TREE_VIEW (source_widget))
+    if (GTK_IS_TREE_VIEW (source_widget))
     {
         NautilusWindow *window;
         NautilusWindowSlot *active_slot;
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
index 414656de0..1ec385a37 100644
--- a/src/nautilus-file.c
+++ b/src/nautilus-file.c
@@ -5248,18 +5248,10 @@ nautilus_file_get_thumbnail_icon (NautilusFile          *file,
             /* We don't want frames around small icons */
             if (!gdk_pixbuf_get_has_alpha (file->details->thumbnail) || s >= 128 * scale)
             {
-                gboolean use_experimental_views;
-
-                use_experimental_views = g_settings_get_boolean (nautilus_preferences,
-                                                                 
NAUTILUS_PREFERENCES_USE_EXPERIMENTAL_VIEWS);
                 if (nautilus_is_video_file (file))
                 {
                     nautilus_ui_frame_video (&pixbuf);
                 }
-                else if (!use_experimental_views)
-                {
-                    nautilus_ui_frame_image (&pixbuf);
-                }
             }
 
             g_clear_object (&file->details->scaled_thumbnail);
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 9cc9c6656..002631b84 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -10075,22 +10075,12 @@ nautilus_files_view_new (guint               id,
                          NautilusWindowSlot *slot)
 {
     NautilusFilesView *view = NULL;
-    gboolean use_experimental_views;
 
-    use_experimental_views = g_settings_get_boolean (nautilus_preferences,
-                                                     NAUTILUS_PREFERENCES_USE_EXPERIMENTAL_VIEWS);
     switch (id)
     {
         case NAUTILUS_VIEW_GRID_ID:
         {
-            if (use_experimental_views)
-            {
-                view = NAUTILUS_FILES_VIEW (nautilus_view_icon_controller_new (slot));
-            }
-            else
-            {
-                view = nautilus_canvas_view_new (slot);
-            }
+            view = NAUTILUS_FILES_VIEW (nautilus_view_icon_controller_new (slot));
         }
         break;
 
diff --git a/src/nautilus-global-preferences.h b/src/nautilus-global-preferences.h
index 6f098b6b8..e7b158001 100644
--- a/src/nautilus-global-preferences.h
+++ b/src/nautilus-global-preferences.h
@@ -84,15 +84,9 @@ typedef enum
 /* Icon View */
 #define NAUTILUS_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL              "default-zoom-level"
 
-/* Experimental views */
-#define NAUTILUS_PREFERENCES_USE_EXPERIMENTAL_VIEWS "use-experimental-views"
-
 /* Which text attributes appear beneath icon names */
 #define NAUTILUS_PREFERENCES_ICON_VIEW_CAPTIONS                                "captions"
 
-/* ellipsization preferences */
-#define NAUTILUS_PREFERENCES_ICON_VIEW_TEXT_ELLIPSIS_LIMIT             "text-ellipsis-limit"
-
 /* List View */
 #define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL              "default-zoom-level"
 #define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS         "default-visible-columns"
diff --git a/src/nautilus-types.h b/src/nautilus-types.h
index 3c2979a67..d980c5052 100644
--- a/src/nautilus-types.h
+++ b/src/nautilus-types.h
@@ -32,8 +32,6 @@
 
 typedef struct _NautilusBookmark            NautilusBookmark;
 typedef struct _NautilusBookmarkList        NautilusBookmarkList;
-typedef struct _NautilusCanvasContainer     NautilusCanvasContainer;
-typedef struct _NautilusCanvasView          NautilusCanvasView;
 typedef struct _NautilusDirectory           NautilusDirectory;
 typedef struct  NautilusFile                NautilusFile;
 typedef struct  NautilusFileQueue           NautilusFileQueue;
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index d4da30fa5..375122b02 100644
--- a/src/nautilus-window-slot.c
+++ b/src/nautilus-window-slot.c
@@ -1091,24 +1091,6 @@ recursive_search_preferences_changed (GSettings *settings,
     update_search_information (self);
 }
 
-static void
-use_experimental_views_changed_callback (GSettings *settings,
-                                         gchar     *key,
-                                         gpointer   callback_data)
-{
-    NautilusWindowSlot *self;
-
-    self = callback_data;
-
-    if (nautilus_window_slot_content_view_matches (self, NAUTILUS_VIEW_GRID_ID))
-    {
-        /* Note that although this call does not change the view id,
-         * it changes the canvas view between new and old.
-         */
-        nautilus_window_slot_set_content_view (self, NAUTILUS_VIEW_GRID_ID);
-    }
-}
-
 static void
 nautilus_window_slot_init (NautilusWindowSlot *self)
 {
@@ -1118,9 +1100,6 @@ nautilus_window_slot_init (NautilusWindowSlot *self)
     g_signal_connect (nautilus_trash_monitor_get (),
                       "trash-state-changed",
                       G_CALLBACK (trash_state_changed_cb), self);
-    g_signal_connect_object (nautilus_preferences,
-                             "changed::" NAUTILUS_PREFERENCES_USE_EXPERIMENTAL_VIEWS,
-                             G_CALLBACK (use_experimental_views_changed_callback), self, 0);
 
     g_signal_connect_object (nautilus_preferences,
                              "changed::recursive-search",


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