bloatpad: add 'New Window' menu item

This commit is contained in:
Ryan Lortie 2011-12-11 00:06:50 -05:00
parent 8bc7513a7b
commit 9e3c4c6b03

View File

@ -137,6 +137,14 @@ bloat_pad_finalize (GObject *object)
G_OBJECT_CLASS (bloat_pad_parent_class)->finalize (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,
@ -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>"