summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/bloatpad.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/examples/bloatpad.c b/examples/bloatpad.c
index 368c81fc80..62eb0d0035 100644
--- a/examples/bloatpad.c
+++ b/examples/bloatpad.c
@@ -138,6 +138,14 @@ bloat_pad_finalize (GObject *object)
}
static void
+new_activated (GSimpleAction *action,
+ GVariant *parameter,
+ gpointer user_data)
+{
+ g_application_activate (user_data);
+}
+
+static void
show_about (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -149,7 +157,6 @@ show_about (GSimpleAction *action,
NULL);
}
-
static void
quit_app (GSimpleAction *action,
GVariant *parameter,
@@ -173,6 +180,7 @@ quit_app (GSimpleAction *action,
}
static GActionEntry app_entries[] = {
+ { "new", new_activated, NULL, NULL, NULL },
{ "about", show_about, NULL, NULL, NULL },
{ "quit", quit_app, NULL, NULL, NULL },
};
@@ -192,6 +200,9 @@ bloat_pad_startup (GApplication *application)
"<interface>"
" <menu id='app-menu'>"
" <section>"
+ " <item label='_New Window' action='app.new'/>"
+ " </section>"
+ " <section>"
" <item label='_About Bloatpad' action='app.about'/>"
" </section>"
" <section>"