From 8745a28cef42ba0134b2672f5131a62b782958c1 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 21 May 2014 12:02:48 +0100 Subject: Add a button and link it to the hello-world action Create a button, and link it to the "app.hello-world" action, so that clicking it does the same as selecting the menu item or pressing the keyboard shortcut for that action. --- python-gnome-app | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python-gnome-app') diff --git a/python-gnome-app b/python-gnome-app index 67d36d0..61f9c77 100755 --- a/python-gnome-app +++ b/python-gnome-app @@ -35,6 +35,10 @@ class PythonApp(Gtk.Application): section.append_item(quit_item) self.set_app_menu(appmenu) + button = Gtk.Button( + label="Hello world!", action_name="app.hello-world") + self.window.add(button) + def on_activate(self, app): self.window.show_all() -- cgit