[nautilus/origin/2070-menu-item-re-organization: 3/5] move_zoom_to_primary_menu




commit 7ca3acb23b5bf3143d48391c79cc4825ffe00e61
Author: António Fernandes <antoniof gnome org>
Date:   Mon Jan 10 13:04:11 2022 +0000

    move_zoom_to_primary_menu

 src/nautilus-toolbar.c               |  8 ++++----
 src/resources/ui/nautilus-toolbar.ui | 28 ++++++++++++++--------------
 2 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/src/nautilus-toolbar.c b/src/nautilus-toolbar.c
index 3ca1b934b..57fe64dc3 100644
--- a/src/nautilus-toolbar.c
+++ b/src/nautilus-toolbar.c
@@ -1230,13 +1230,13 @@ on_slot_toolbar_menu_sections_changed (NautilusToolbar    *self,
         return;
     }
 
-    /* Let's assume that zoom and sort sections are the first and second items
+    /* Let's assume that sort section is the first item
      * in view_menu, as per nautilus-toolbar.ui. */
 
-    sort_item = g_menu_item_new_from_model (self->view_menu, 1);
-    g_menu_remove (G_MENU (self->view_menu), 1);
+    sort_item = g_menu_item_new_from_model (self->view_menu, 0);
+    g_menu_remove (G_MENU (self->view_menu), 0);
     g_menu_item_set_section (sort_item, new_sections->sort_section);
-    g_menu_insert_item (G_MENU (self->view_menu), 1, sort_item);
+    g_menu_insert_item (G_MENU (self->view_menu), 0, sort_item);
 }
 
 
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index 246506ca2..9c86d2058 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -4,20 +4,6 @@
   <object class="GtkPopoverMenu" id="back_menu"/>
   <object class="GtkPopoverMenu" id="forward_menu"/>
   <menu id="view_menu">
-    <section>
-      <attribute name="label" translatable="yes">Icon size</attribute>
-      <attribute name="display-hint">inline-buttons</attribute>
-      <item>
-        <attribute name="label" translatable="yes">Zoom out</attribute>
-        <attribute name="action">view.zoom-out</attribute>
-        <attribute name="verb-icon">zoom-out-symbolic</attribute>
-      </item>
-      <item>
-        <attribute name="label" translatable="yes">Zoom in</attribute>
-        <attribute name="action">view.zoom-in</attribute>
-        <attribute name="verb-icon">zoom-in-symbolic</attribute>
-      </item>
-    </section>
     <section>
       <attribute name="label" translatable="yes" context="menu item" comments="Translators: a menu item in a 
group of sorting options in a toolbar menu, with criterions such as &quot;A-Z&quot; or &quot;Last 
Modified&quot;.">Sort</attribute>
       <!--
@@ -64,6 +50,20 @@
         <attribute name="verb-icon">folder-new-symbolic</attribute>
       </item>
     </section>
+    <section>
+      <attribute name="label" translatable="yes">Icon size</attribute>
+      <attribute name="display-hint">inline-buttons</attribute>
+      <item>
+        <attribute name="label" translatable="yes">Zoom out</attribute>
+        <attribute name="action">view.zoom-out</attribute>
+        <attribute name="verb-icon">zoom-out-symbolic</attribute>
+      </item>
+      <item>
+        <attribute name="label" translatable="yes">Zoom in</attribute>
+        <attribute name="action">view.zoom-in</attribute>
+        <attribute name="verb-icon">zoom-in-symbolic</attribute>
+      </item>
+    </section>
     <section id="undo_redo_section">
       <!-- Note: This section is often recreated by undo_manager_changed() to
            change the labels of the actions. If you change anything here,


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