summaryrefslogtreecommitdiff
path: root/examples/application8/exampleapp.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/application8/exampleapp.c')
-rw-r--r--examples/application8/exampleapp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/application8/exampleapp.c b/examples/application8/exampleapp.c
index 1bc6ce85ee..66e85793f8 100644
--- a/examples/application8/exampleapp.c
+++ b/examples/application8/exampleapp.c
@@ -53,12 +53,16 @@ example_app_startup (GApplication *app)
{
GtkBuilder *builder;
GMenuModel *app_menu;
+ const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
g_action_map_add_action_entries (G_ACTION_MAP (app),
app_entries, G_N_ELEMENTS (app_entries),
app);
+ gtk_application_set_accels_for_action (GTK_APPLICATION (app),
+ "app.quit",
+ quit_accels);
builder = gtk_builder_new_from_resource ("/org/gtk/exampleapp/app-menu.ui");
app_menu = G_MENU_MODEL (gtk_builder_get_object (builder, "appmenu"));