[nautilus] Remove App Menu



commit 99324771868ca7fad75889418ecd08765d8b4629
Author: p3732 <p3732 users noreply github com>
Date:   Tue Oct 30 23:43:58 2018 +0100

    Remove App Menu
    
    Remove the app menu, add the Sidebar toggle action to the main menu and rename "About" to "About Files".

 src/nautilus-application.c           | 11 ---------
 src/resources/gtk/menus.ui           | 45 ------------------------------------
 src/resources/nautilus.gresource.xml |  1 -
 src/resources/ui/nautilus-toolbar.ui | 37 ++++++++++++++++++++++++-----
 4 files changed, 31 insertions(+), 63 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index 498f7a147..2d73d08f8 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -881,23 +881,12 @@ const static GActionEntry app_entries[] =
 static void
 nautilus_init_application_actions (NautilusApplication *app)
 {
-    const gchar *debug_no_app_menu;
     GAction *sidebar_action;
 
     g_action_map_add_action_entries (G_ACTION_MAP (app),
                                      app_entries, G_N_ELEMENTS (app_entries),
                                      app);
 
-    debug_no_app_menu = g_getenv ("NAUTILUS_DEBUG_NO_APP_MENU");
-    if (debug_no_app_menu)
-    {
-        DEBUG ("Disabling app menu GtkSetting as requested...");
-        g_object_set (gtk_settings_get_default (),
-                      "gtk-shell-shows-app-menu", FALSE,
-                      NULL);
-    }
-
-
 
     sidebar_action = g_action_map_lookup_action (G_ACTION_MAP (app),
                                                  "show-hide-sidebar");
diff --git a/src/resources/nautilus.gresource.xml b/src/resources/nautilus.gresource.xml
index b1c0b9bbb..e2bd0870e 100644
--- a/src/resources/nautilus.gresource.xml
+++ b/src/resources/nautilus.gresource.xml
@@ -3,7 +3,6 @@
   <gresource prefix="/org/gnome/nautilus">
     <file compressed="true">ui/nautilus-preferences-window.ui</file>
     <file compressed="true">ui/nautilus-search-popover.ui</file>
-    <file>gtk/menus.ui</file>
     <file>ui/nautilus-pathbar-context-menu.ui</file>
     <file>ui/nautilus-toolbar.ui</file>
     <file>ui/nautilus-toolbar-switcher.ui</file>
diff --git a/src/resources/ui/nautilus-toolbar.ui b/src/resources/ui/nautilus-toolbar.ui
index 30b4cddf9..e5b8b4771 100644
--- a/src/resources/ui/nautilus-toolbar.ui
+++ b/src/resources/ui/nautilus-toolbar.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.0 -->
+<!-- Generated with glade 3.22.1 -->
 <interface>
   <requires lib="gtk+" version="3.22"/>
   <object class="GtkPopoverMenu" id="app_menu">
@@ -52,6 +52,31 @@
             <property name="position">2</property>
           </packing>
         </child>
+        <child>
+          <object class="GtkModelButton">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="receives_default">True</property>
+            <property name="action_name">app.show-hide-sidebar</property>
+            <property name="text" translatable="yes">_Sidebar</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">3</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkSeparator">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">4</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkModelButton">
             <property name="visible">True</property>
@@ -63,7 +88,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">3</property>
+            <property name="position">5</property>
           </packing>
         </child>
         <child>
@@ -77,7 +102,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">4</property>
+            <property name="position">6</property>
           </packing>
         </child>
         <child>
@@ -91,7 +116,7 @@
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">5</property>
+            <property name="position">7</property>
           </packing>
         </child>
         <child>
@@ -100,12 +125,12 @@
             <property name="can_focus">True</property>
             <property name="receives_default">True</property>
             <property name="action_name">app.about</property>
-            <property name="text" translatable="yes">_About</property>
+            <property name="text" translatable="yes">_About Files</property>
           </object>
           <packing>
             <property name="expand">False</property>
             <property name="fill">True</property>
-            <property name="position">6</property>
+            <property name="position">8</property>
           </packing>
         </child>
       </object>


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