[gnome-control-center] shell: Remove AppMenu
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] shell: Remove AppMenu
- Date: Wed, 17 Oct 2018 22:20:46 +0000 (UTC)
commit 58d5c9411d54279560975cb88fca6f2c38f00d98
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Oct 12 11:42:10 2018 +1300
shell: Remove AppMenu
https://wiki.gnome.org/Initiatives/GnomeGoals/AppMenuRetirement
panels/network/network-wifi.ui | 2 +-
shell/cc-application.c | 14 --------------
shell/cc-window.ui | 39 +++++++++++++++++++++++++++++++++++++++
3 files changed, 40 insertions(+), 15 deletions(-)
---
diff --git a/panels/network/network-wifi.ui b/panels/network/network-wifi.ui
index afa8afb12..13ca15dbe 100644
--- a/panels/network/network-wifi.ui
+++ b/panels/network/network-wifi.ui
@@ -1787,7 +1787,7 @@ here</property>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon_name">open-menu-symbolic</property>
+ <property name="icon_name">view-more-symbolic</property>
</object>
</child>
</object>
diff --git a/shell/cc-application.c b/shell/cc-application.c
index 8ffb2bdbf..26313cf5f 100644
--- a/shell/cc-application.c
+++ b/shell/cc-application.c
@@ -227,8 +227,6 @@ static void
cc_application_startup (GApplication *application)
{
CcApplication *self = CC_APPLICATION (application);
- GMenu *section;
- GMenu *menu;
const gchar *help_accels[] = { "F1", NULL };
g_action_map_add_action_entries (G_ACTION_MAP (self),
@@ -246,18 +244,6 @@ cc_application_startup (GApplication *application)
}
#endif /* HAVE_WACOM || HAVE_CHEESE */
- menu = g_menu_new ();
-
- section = g_menu_new ();
- g_menu_append (section, _("Keyboard Shortcuts"), "win.show-help-overlay");
- g_menu_append (section, _("Help"), "app.help");
- g_menu_append (section, _("Quit"), "app.quit");
-
- g_menu_append_section (menu, NULL, G_MENU_MODEL (section));
-
- gtk_application_set_app_menu (GTK_APPLICATION (application),
- G_MENU_MODEL (menu));
-
gtk_application_set_accels_for_action (GTK_APPLICATION (application),
"app.help", help_accels);
diff --git a/shell/cc-window.ui b/shell/cc-window.ui
index fb17f833d..e5cec5053 100644
--- a/shell/cc-window.ui
+++ b/shell/cc-window.ui
@@ -166,6 +166,32 @@
</style>
</object>
</child>
+ <child>
+ <object class="GtkMenuButton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="menu_model">primary_menu</property>
+ <child internal-child="accessible">
+ <object class="AtkObject">
+ <property name="accessible-name" translatable="yes">Primary Menu</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">open-menu-symbolic</property>
+ </object>
+ </child>
+ <style>
+ <class name="image-button"/>
+ </style>
+ </object>
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
+ </child>
</object>
</child>
<child>
@@ -233,4 +259,17 @@
<signal name="response" handler="on_development_warning_dialog_responded_cb" object="CcWindow"
swapped="no" />
</object>
+ <menu id="primary_menu">
+ <section>
+ <item>
+ <attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
+ <attribute name="action">win.show-help-overlay</attribute>
+ </item>
+ <item>
+ <attribute name="label" translatable="yes">Help</attribute>
+ <attribute name="action">app.help</attribute>
+ </item>
+ </section>
+ </menu>
+
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]