[polari] ui: Back out of app menu removal



commit d74a62ef5ff3a5644ee9fd9e93ef2f70b87b9bc0
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Jul 25 07:07:42 2018 +0200

    ui: Back out of app menu removal
    
    The change was premature, the consensus is now to target 3.32
    rather than 3.30[0].
    
    This reverts commits b66deb562b and i7f0a16a47.
    
    [0] https://mail.gnome.org/archives/desktop-devel-list/2018-July/msg00029.html

 data/resources/main-window.ui | 47 -------------------------------------------
 data/resources/menus.ui       | 18 +++++++++++++++++
 src/mainWindow.js             |  8 ++------
 3 files changed, 20 insertions(+), 53 deletions(-)
---
diff --git a/data/resources/main-window.ui b/data/resources/main-window.ui
index 53b4c48..9247e48 100644
--- a/data/resources/main-window.ui
+++ b/data/resources/main-window.ui
@@ -9,32 +9,6 @@
       <class name="polari-user-list"/>
     </style>
   </object>
-  <menu id="hamburgerMenu">
-    <section>
-      <item>
-        <attribute name="action">app.run-in-background</attribute>
-        <attribute name="label" translatable="yes">Run in Background</attribute>
-      </item>
-    </section>
-    <section>
-      <item>
-        <attribute name="action">win.show-help-overlay</attribute>
-        <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
-      </item>
-      <item>
-        <attribute name="action">app.help</attribute>
-        <attribute name="label" translatable="yes">Help</attribute>
-      </item>
-      <item>
-        <attribute name="action">app.about</attribute>
-        <attribute name="label" translatable="yes">About</attribute>
-      </item>
-      <item>
-        <attribute name="action">app.quit</attribute>
-        <attribute name="label" translatable="yes">Quit</attribute>
-      </item>
-    </section>
-  </menu>
   <object class="GtkMessageDialog" id="closeConfirmationDialog">
     <property name="message-type">question</property>
     <property name="text" translatable="yes">Run Polari in the Background?</property>
@@ -100,27 +74,6 @@
                 <property name="pack-type">start</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkMenuButton">
-                <property name="visible">True</property>
-                <property name="halign">end</property>
-                <property name="valign">center</property>
-                <property name="menu-model">hamburgerMenu</property>
-                <style>
-                  <class name="image-button"/>
-                </style>
-                <child>
-                  <object class="GtkImage">
-                    <property name="visible">True</property>
-                    <property name="icon-name">open-menu-symbolic</property>
-                    <property name="icon-size">1</property>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="pack-type">end</property>
-              </packing>
-            </child>
           </object>
         </child>
         <child>
diff --git a/data/resources/menus.ui b/data/resources/menus.ui
index be135ad..eff8d78 100644
--- a/data/resources/menus.ui
+++ b/data/resources/menus.ui
@@ -1,6 +1,24 @@
 <interface>
   <menu id="app-menu">
     <section>
+      <item>
+        <attribute name="action">app.run-in-background</attribute>
+        <attribute name="label" translatable="yes">Run in Background</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="action">win.show-help-overlay</attribute>
+        <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
+      </item>
+      <item>
+        <attribute name="action">app.help</attribute>
+        <attribute name="label" translatable="yes">Help</attribute>
+      </item>
+      <item>
+        <attribute name="action">app.about</attribute>
+        <attribute name="label" translatable="yes">About</attribute>
+      </item>
       <item>
         <attribute name="action">app.quit</attribute>
         <attribute name="label" translatable="yes">Quit</attribute>
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 5245f9a..11d4dae 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -282,10 +282,6 @@ var MainWindow = GObject.registerClass({
         this._roomListRevealer.reveal_child = hasAccounts;
     }
 
-    _filterFallbackAppMenu(layoutStr) {
-        return layoutStr.split(',').filter(s => s != 'menu').join(',');
-    }
-
     _updateDecorations() {
         let layoutLeft = null;
         let layoutRight = null;
@@ -294,8 +290,8 @@ var MainWindow = GObject.registerClass({
         if (layout) {
             let split = layout.split(':');
 
-            layoutLeft = this._filterFallbackAppMenu(split[0]) + ':';
-            layoutRight = ':' + this._filterFallbackAppMenu(split[1]);
+            layoutLeft = split[0] + ':';
+            layoutRight = ':' + split[1];
         }
 
         this._titlebarLeft.set_decoration_layout(layoutLeft);


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