[quadrapassel] menus: Update for GNOME 3.32 recommendations
- From: Jeremy Bicha <jbicha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [quadrapassel] menus: Update for GNOME 3.32 recommendations
- Date: Wed, 5 Dec 2018 21:20:16 +0000 (UTC)
commit 5e747c202977701a2744d89de0a81046cba9e156
Author: Jeremy Bicha <jbicha ubuntu com>
Date: Wed Dec 5 16:10:44 2018 -0500
menus: Update for GNOME 3.32 recommendations
https://gitlab.gnome.org/GNOME/Initiatives/wikis/App-Menu-Retirement
src/quadrapassel.vala | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
---
diff --git a/src/quadrapassel.vala b/src/quadrapassel.vala
index 0ec36ff..8938d87 100644
--- a/src/quadrapassel.vala
+++ b/src/quadrapassel.vala
@@ -89,19 +89,6 @@ public class Quadrapassel : Gtk.Application
set_accels_for_action ("app.quit", {"<Primary>q"});
pause_action = lookup_action ("pause") as SimpleAction;
- var menu = new Menu ();
- var section = new Menu ();
- menu.append_section (null, section);
- section.append (_("_New Game"), "app.new-game");
- section.append (_("_Scores"), "app.scores");
- section.append (_("_Preferences"), "app.preferences");
- section = new Menu ();
- menu.append_section (null, section);
- section.append (_("_Help"), "app.help");
- section.append (_("_About"), "app.about");
- section.append (_("_Quit"), "app.quit");
- set_app_menu (menu);
-
settings = new Settings ("org.gnome.quadrapassel");
window = new Gtk.ApplicationWindow (this);
@@ -122,6 +109,22 @@ public class Quadrapassel : Gtk.Application
headerbar.show ();
window.set_titlebar (headerbar);
+ var menu = new Menu ();
+ var section = new Menu ();
+ menu.append_section (null, section);
+ section.append (_("_New Game"), "app.new-game");
+ section.append (_("_Scores"), "app.scores");
+ section = new Menu ();
+ menu.append_section (null, section);
+ section.append (_("_Preferences"), "app.preferences");
+ section.append (_("_Help"), "app.help");
+ section.append (_("_About Quadrapassel"), "app.about");
+ 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 (menu);
+ headerbar.pack_end(menu_button);
+
var game_grid = new Gtk.Grid ();
game_grid.set_column_homogeneous (true);
window.add (game_grid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]