[baobab] Get rid of the menubar



commit 110f41ce072f06080faaa7922ade788548d37e32
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Mon Jul 8 11:36:17 2013 +0200

    Get rid of the menubar
    
    All its useful items are contained either in the application menu or in
    the window menu. Just let the toolkit replace it with the
    in-window app-menu when appropriate (Unity etc).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703774

 src/baobab-application.vala |   12 +-------
 src/baobab-menu.ui          |   62 -------------------------------------------
 2 files changed, 2 insertions(+), 72 deletions(-)
---
diff --git a/src/baobab-application.vala b/src/baobab-application.vala
index de94995..a51d83d 100644
--- a/src/baobab-application.vala
+++ b/src/baobab-application.vala
@@ -82,22 +82,14 @@ namespace Baobab {
 
             ui_settings.delay ();
 
-            // Menus: in gnome shell we just use the app menu, since the remaining
-            // items are too few to look ok in a menubar and they are not essential
-            var gtk_settings = Gtk.Settings.get_default ();
             var builder = new Gtk.Builder ();
             try {
                 builder.add_from_resource ("/org/gnome/baobab/ui/baobab-menu.ui");
             } catch (Error e) {
                 error ("loading menu builder file: %s", e.message);
             }
-            if (gtk_settings.gtk_shell_shows_app_menu) {
-                var app_menu = builder.get_object ("appmenu") as MenuModel;
-                set_app_menu (app_menu);
-            } else {
-                var menubar = builder.get_object ("menubar") as MenuModel;
-                set_menubar (menubar);
-            }
+            var app_menu = builder.get_object ("appmenu") as MenuModel;
+            set_app_menu (app_menu);
 
             add_accelerator ("F10", "win.gear-menu", null);
             add_accelerator ("<Primary>r", "win.reload", null);
diff --git a/src/baobab-menu.ui b/src/baobab-menu.ui
index 50647bb..e1426a0 100644
--- a/src/baobab-menu.ui
+++ b/src/baobab-menu.ui
@@ -21,68 +21,6 @@
       </item>
     </section>
   </menu>
-  <menu id="menubar">
-    <submenu>
-      <attribute name="label" translatable="yes">_Analyzer</attribute>
-      <section>
-        <item>
-          <attribute name="label" translatable="yes">_Scan Home</attribute>
-          <attribute name="action">win.scan-home</attribute>
-          <attribute name="accel">&lt;Primary&gt;h</attribute>
-        </item>
-        <item>
-          <attribute name="label" translatable="yes">Scan F_older…</attribute>
-          <attribute name="action">win.scan-folder</attribute>
-          <attribute name="accel">&lt;Primary&gt;o</attribute>
-        </item>
-      <item>
-        <attribute name="label" translatable="yes">Scan Remote Fo_lder…</attribute>
-        <attribute name="action">win.scan-remote</attribute>
-      </item>
-      </section>
-      <section>
-        <item>
-          <attribute name="label" translatable="yes">_Quit</attribute>
-          <attribute name="action">app.quit</attribute>
-          <attribute name="accel">&lt;Primary&gt;q</attribute>
-        </item>
-      </section>
-    </submenu>
-    <submenu>
-      <attribute name="label" translatable="yes">_View</attribute>
-      <section>
-        <item>
-          <attribute name="label" translatable="yes">_Reload</attribute>
-          <attribute name="action">win.reload</attribute>
-          <attribute name="accel">&lt;Primary&gt;r</attribute>
-        </item>
-      </section>
-      <section>
-        <item>
-          <attribute name="label" translatable="yes">_Expand All</attribute>
-          <attribute name="action">win.expand-all</attribute>
-        </item>
-        <item>
-          <attribute name="label" translatable="yes">_Collapse All</attribute>
-          <attribute name="action">win.collapse-all</attribute>
-        </item>
-      </section>
-    </submenu>
-    <submenu>
-      <attribute name="label" translatable="yes">_Help</attribute>
-      <section>
-        <item>
-          <attribute name="label" translatable="yes">_Help</attribute>
-          <attribute name="action">win.help</attribute>
-          <attribute name="accel">F1</attribute>
-        </item>
-        <item>
-          <attribute name="label" translatable="yes">_About</attribute>
-          <attribute name="action">win.about</attribute>
-        </item>
-      </section>
-    </submenu>
-  </menu>
   <menu id="chartmenu">
     <section>
       <item>


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