[gnome-tetravex] menus: Update for GNOME 3.32 recommendations
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] menus: Update for GNOME 3.32 recommendations
- Date: Thu, 6 Dec 2018 17:30:08 +0000 (UTC)
commit f065b53d86bacb033ee8a4304180219a849583bf
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Thu Dec 6 12:21:32 2018 -0500
menus: Update for GNOME 3.32 recommendations
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
src/app-menu.ui | 7 +------
src/gnome-tetravex.gresource.xml | 4 +---
src/gnome-tetravex.vala | 8 ++++++++
3 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/app-menu.ui b/src/app-menu.ui
index 8089164..1398020 100644
--- a/src/app-menu.ui
+++ b/src/app-menu.ui
@@ -50,14 +50,9 @@
<attribute name="accel">F1</attribute>
</item>
<item>
- <attribute name="label" translatable="yes">_About</attribute>
+ <attribute name="label" translatable="yes">_About Tetravex</attribute>
<attribute name="action">app.about</attribute>
</item>
- <item>
- <attribute name="label" translatable="yes">_Quit</attribute>
- <attribute name="action">app.quit</attribute>
- <attribute name="accel"><Primary>q</attribute>
- </item>
</section>
</menu>
</interface>
diff --git a/src/gnome-tetravex.gresource.xml b/src/gnome-tetravex.gresource.xml
index 5c9aebf..caca0a0 100644
--- a/src/gnome-tetravex.gresource.xml
+++ b/src/gnome-tetravex.gresource.xml
@@ -2,8 +2,6 @@
<gresources>
<gresource prefix="/org/gnome/tetravex">
<file preprocess="xml-stripblanks">gnome-tetravex.ui</file>
- </gresource>
- <gresource prefix="/org/gnome/tetravex/gtk">
- <file alias="menus.ui" preprocess="xml-stripblanks">app-menu.ui</file>
+ <file preprocess="xml-stripblanks">app-menu.ui</file>
</gresource>
</gresources>
diff --git a/src/gnome-tetravex.vala b/src/gnome-tetravex.vala
index aea20b6..74d0689 100644
--- a/src/gnome-tetravex.vala
+++ b/src/gnome-tetravex.vala
@@ -107,6 +107,14 @@ public class Tetravex : Gtk.Application
headerbar.show_close_button = true;
window.set_titlebar (headerbar);
+ var menu_builder = new Gtk.Builder.from_resource ("/org/gnome/tetravex/app-menu.ui");
+ var appmenu = menu_builder.get_object("app-menu") as MenuModel;
+ var menu_button = new Gtk.MenuButton ();
+ menu_button.set_image (new Gtk.Image.from_icon_name ("open-menu-symbolic", Gtk.IconSize.BUTTON));
+ menu_button.show ();
+ menu_button.set_menu_model (appmenu);
+ headerbar.pack_end(menu_button);
+
var grid = builder.get_object ("grid") as Gtk.Grid;
view = new PuzzleView ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]