[gnome-games] display-header-bar: Convert secondary menu to a GMenu



commit e64ceab34afcea4a598867a5d4e0f10dbfa41098
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Tue Jan 28 19:06:48 2020 +0500

    display-header-bar: Convert secondary menu to a GMenu

 data/ui/display-header-bar.ui | 45 +++++++++++++++----------------------------
 1 file changed, 15 insertions(+), 30 deletions(-)
---
diff --git a/data/ui/display-header-bar.ui b/data/ui/display-header-bar.ui
index 584378a2..b2f501e6 100644
--- a/data/ui/display-header-bar.ui
+++ b/data/ui/display-header-bar.ui
@@ -67,10 +67,10 @@
             </child>
             <child>
               <object class="GtkMenuButton" id="secondary_menu_button">
-                <property name="popover">secondary_menu</property>
                 <property name="visible">True</property>
                 <property name="valign">center</property>
                 <property name="can-focus">False</property>
+                <property name="menu-model">secondary_menu</property>
                 <style>
                   <class name="image-button"/>
                 </style>
@@ -178,33 +178,18 @@
       </object>
     </child>
   </template>
-  <object class="GtkPopoverMenu" id="secondary_menu">
-    <child>
-      <object class="GtkBox" id="secondary_menu_box">
-        <property name="visible">True</property>
-        <property name="margin">6</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <object class="GtkModelButton">
-            <property name="visible">True</property>
-            <property name="text" translatable="yes">_Restart</property>
-            <property name="action-name">display.restart</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkSeparator">
-            <property name="orientation">vertical</property>
-            <property name="visible">True</property>
-          </object>
-        </child>
-        <child>
-          <object class="GtkModelButton">
-            <property name="visible">True</property>
-            <property name="text" translatable="yes">_Snapshots</property>
-            <property name="action-name">display.show-snapshots</property>
-          </object>
-        </child>
-      </object>
-    </child>
-  </object>
+  <menu id="secondary_menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Restart</attribute>
+        <attribute name="action">display.restart</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Snapshots</attribute>
+        <attribute name="action">display.show-snapshots</attribute>
+      </item>
+    </section>
+  </menu>
 </interface>


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