[nautilus/wip/exalm/libhandy: 2/3] general: Remove tab position setting




commit 7ceed09442c80520fc9a990809fa3566e479e937
Author: Christopher Davis <christopherdavis gnome org>
Date:   Sat Jul 9 21:19:00 2022 -0400

    general: Remove tab position setting
    
    Instead of using this setting for custom behavior,
    we use libadwaita's `add_page()` API. Since we
    don't use the setting anymore, we can completely
    remove it.

 data/org.gnome.nautilus.gschema.xml | 13 -------------
 src/nautilus-global-preferences.h   |  6 ------
 src/nautilus-mime-actions.c         | 12 ------------
 src/nautilus-window.c               |  7 +------
 4 files changed, 1 insertion(+), 37 deletions(-)
---
diff --git a/data/org.gnome.nautilus.gschema.xml b/data/org.gnome.nautilus.gschema.xml
index 39a8ed753..2cfdd21b4 100644
--- a/data/org.gnome.nautilus.gschema.xml
+++ b/data/org.gnome.nautilus.gschema.xml
@@ -51,11 +51,6 @@
     <value value="3" nick="larger"/>
   </enum>
 
-  <enum id="org.gnome.nautilus.TabPosition">
-    <value value="0" nick="after-current-tab"/>
-    <value value="1" nick="end"/>
-  </enum>
-
   <enum id="org.gnome.nautilus.SearchFilterTimeType">
     <value value="0" nick="last_modified"/>
     <value value="1" nick="last_used"/>
@@ -78,14 +73,6 @@
   </schema>
 
   <schema path="/org/gnome/nautilus/preferences/" id="org.gnome.nautilus.preferences" 
gettext-domain="nautilus">
-    <key name="tabs-open-position" enum="org.gnome.nautilus.TabPosition">
-      <aliases>
-        <alias value='after_current_tab' target='after-current-tab'/>
-      </aliases>
-      <default>'after-current-tab'</default>
-      <summary>Where to position newly open tabs in browser windows</summary>
-      <description>If set to “after-current-tab”, then new tabs are inserted after the current tab. If set 
to “end”, then new tabs are appended to the end of the tab list.</description>
-    </key>
     <key type="b" name="always-use-location-entry">
       <default>false</default>
       <summary>Always use the location entry, instead of the pathbar</summary>
diff --git a/src/nautilus-global-preferences.h b/src/nautilus-global-preferences.h
index c5a7b6b5c..44bf9d07c 100644
--- a/src/nautilus-global-preferences.h
+++ b/src/nautilus-global-preferences.h
@@ -36,12 +36,6 @@ G_BEGIN_DECLS
 #define NAUTILUS_PREFERENCES_MOUSE_FORWARD_BUTTON              "mouse-forward-button"
 #define NAUTILUS_PREFERENCES_MOUSE_BACK_BUTTON                 "mouse-back-button"
 
-typedef enum
-{
-       NAUTILUS_NEW_TAB_POSITION_AFTER_CURRENT_TAB,
-       NAUTILUS_NEW_TAB_POSITION_END,
-} NautilusNewTabPosition;
-
 /* Single/Double click preference  */
 #define NAUTILUS_PREFERENCES_CLICK_POLICY                      "click-policy"
 
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index 3ceb0a953..7871e5e0e 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1658,18 +1658,6 @@ activate_files_internal (ActivateParameters *parameters)
 
     if (parameters->slot != NULL)
     {
-        if ((parameters->flags & NAUTILUS_OPEN_FLAG_NEW_TAB) != 0 &&
-            g_settings_get_enum (nautilus_preferences, NAUTILUS_PREFERENCES_NEW_TAB_POSITION) ==
-            NAUTILUS_NEW_TAB_POSITION_AFTER_CURRENT_TAB)
-        {
-            /* When inserting N tabs after the current one,
-             * we first open tab N, then tab N-1, ..., then tab 0.
-             * Each of them is appended to the current tab, i.e.
-             * prepended to the list of tabs to open.
-             */
-            g_queue_reverse (parameters->open_in_view_files);
-        }
-
         for (l = g_queue_peek_head_link (parameters->open_in_view_files); l != NULL; l = l->next)
         {
             g_autofree char *uri = NULL;
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 5b6534c53..0e8a061df 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -623,18 +623,13 @@ nautilus_window_open_location_full (NautilusWindow     *window,
                                     NautilusWindowSlot *target_slot)
 {
     NautilusWindowSlot *active_slot;
-    gboolean new_tab_at_end;
 
     /* Assert that we are not managing new windows */
     g_assert (!(flags & NAUTILUS_OPEN_FLAG_NEW_WINDOW));
     /* if the flags say we want a new tab, open a slot in the current window */
     if ((flags & NAUTILUS_OPEN_FLAG_NEW_TAB) != 0)
     {
-        new_tab_at_end = g_settings_get_enum (nautilus_preferences, NAUTILUS_PREFERENCES_NEW_TAB_POSITION) 
== NAUTILUS_NEW_TAB_POSITION_END;
-        if (new_tab_at_end)
-        {
-            flags |= NAUTILUS_OPEN_FLAG_SLOT_APPEND;
-        }
+        flags |= NAUTILUS_OPEN_FLAG_SLOT_APPEND;
     }
 
     active_slot = nautilus_window_get_active_slot (window);


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