Commit f065b53d authored by Jeremy Bicha's avatar Jeremy Bicha

menus: Update for GNOME 3.32 recommendations

https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
parent 8a2fa5a5
......@@ -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">&lt;Primary&gt;q</attribute>
</item>
</section>
</menu>
</interface>
......@@ -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>
......@@ -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 ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment