summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpython-gnome-app9
1 files changed, 9 insertions, 0 deletions
diff --git a/python-gnome-app b/python-gnome-app
index a69f801..67d36d0 100755
--- a/python-gnome-app
+++ b/python-gnome-app
@@ -26,6 +26,15 @@ class PythonApp(Gtk.Application):
self.add_accelerator("<Primary>q", "app.quit", None)
quit.connect("activate", self.on_quit)
+ appmenu = Gio.Menu.new()
+ section = Gio.Menu.new()
+ hello_world_item = Gio.MenuItem.new("Hello world!", "app.hello-world")
+ quit_item = Gio.MenuItem.new("Quit", "app.quit")
+ appmenu.append_section(None, section)
+ section.append_item(hello_world_item)
+ section.append_item(quit_item)
+ self.set_app_menu(appmenu)
+
def on_activate(self, app):
self.window.show_all()