[gtk/new-style-menu] widget-factory: Redo the new-style menu
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/new-style-menu] widget-factory: Redo the new-style menu
- Date: Thu, 6 Jun 2019 01:39:12 +0000 (UTC)
commit 7e01308c2d551f2f301b4d73431063e2bdd67cab
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jun 6 01:37:37 2019 +0000
widget-factory: Redo the new-style menu
Do this from a menu model first, since that
is easier to get right.
demos/widget-factory/widget-factory.ui | 95 +++++++++++++++++++++++++++++++++-
1 file changed, 94 insertions(+), 1 deletion(-)
---
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index 5ac9074d75..92099a42ed 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -2513,7 +2513,7 @@ microphone-sensitivity-medium-symbolic</property>
<child>
<object class="GtkMenuButton">
<property name="icon-name">view-more-symbolic</property>
- <property name="popover">new_style_menu</property>
+ <property name="menu-model">new_style_menu_model</property>
</object>
</child>
</object>
@@ -3700,4 +3700,97 @@ bad things might happen.</property>
</object>
</child>
</object>
+ <menu id="new_style_menu_model">
+ <section>
+ <attribute name="display-hint">circular-buttons</attribute>
+ <item>
+ <attribute name="verb-icon">printer-symbolic</attribute>
+ <attribute name="action">app.print</attribute>
+ </item>
+ <item>
+ <attribute name="verb-icon">emblem-shared-symbolic</attribute>
+ <attribute name="action">app.share</attribute>
+ </item>
+ </section>
+ <section>
+ <attribute name="label" translatable="yes">Open in New Window</attribute>
+ <attribute name="action">app.open-in</attribute>
+ </section>
+ <section>
+ <attribute name="display-hint">inline-buttons</attribute>
+ <attribute name="label" translatable="yes">Edit</attribute>
+ <item>
+ <attribute name="verb-icon">edit-cut-symbolic</attribute>
+ <attribute name="action">app.cut</attribute>
+ </item>
+ <item>
+ <attribute name="verb-icon">edit-copy-symbolic</attribute>
+ <attribute name="action">app.copy</attribute>
+ </item>
+ <item>
+ <attribute name="verb-icon">edit-paste-symbolic</attribute>
+ <attribute name="action">app.paste</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Pin</attribute>
+ <attribute name="action">app.pin</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Select Labels…</attribute>
+ <attribute name="action">app.labels</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Share…</attribute>
+ <attribute name="action">app.share</attribute>
+ </item>
+ </section>
+ <section>
+ <submenu>
+ <attribute name="label" translatable="yes">Basement</attribute>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Berk</attribute>
+ <attribute name="action">app.berk</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Broni</attribute>
+ <attribute name="action">app.broni</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Drutt</attribute>
+ <attribute name="action">app.drutt</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">The Thing Upstairs</attribute>
+ <attribute name="action">app.upstairs</attribute>
+ </item>
+ </section>
+ </submenu>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Large</attribute>
+ <attribute name="action">app.size</attribute>
+ <attribute name="target">large</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Medium</attribute>
+ <attribute name="action">app.size</attribute>
+ <attribute name="target">medium</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Small</attribute>
+ <attribute name="action">app.size</attribute>
+ <attribute name="target">small</attribute>
+ </item>
+ </section>
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Move to Trash</attribute>
+ <attribute name="action">win.delete</attribute>
+ </item>
+ </section>
+ </menu>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]