[gtk+] bloatpad: add 'New Window' menu item
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] bloatpad: add 'New Window' menu item
- Date: Mon, 19 Dec 2011 18:03:28 +0000 (UTC)
commit 9e3c4c6b03d550190f1152924a998b45a9181119
Author: Ryan Lortie <desrt desrt ca>
Date: Sun Dec 11 00:06:50 2011 -0500
bloatpad: add 'New Window' menu item
examples/bloatpad.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/examples/bloatpad.c b/examples/bloatpad.c
index 368c81f..62eb0d0 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>"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]