diff options
author | David King <amigadave@amigadave.com> | 2014-05-21 12:02:48 +0100 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2014-05-21 12:02:48 +0100 |
commit | 8745a28cef42ba0134b2672f5131a62b782958c1 (patch) | |
tree | 9b5163b85654d65a1740488aed08796a919edfd7 | |
parent | 519fa77576ab32942a8e7b6379d4d28144bb6c23 (diff) | |
download | python-gnome-app-8745a28cef42ba0134b2672f5131a62b782958c1.tar.gz python-gnome-app-8745a28cef42ba0134b2672f5131a62b782958c1.tar.xz python-gnome-app-8745a28cef42ba0134b2672f5131a62b782958c1.zip |
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.
-rwxr-xr-x | python-gnome-app | 4 |
1 files changed, 4 insertions, 0 deletions
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() |