summaryrefslogtreecommitdiffstats
path: root/c-gnome-app.c
diff options
context:
space:
mode:
Diffstat (limited to 'c-gnome-app.c')
-rw-r--r--c-gnome-app.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/c-gnome-app.c b/c-gnome-app.c
index d03f69b..e7fd3c5 100644
--- a/c-gnome-app.c
+++ b/c-gnome-app.c
@@ -37,6 +37,7 @@ on_startup (GApplication *app,
gpointer user_data)
{
GtkApplication *gtk_app;
+ GtkWidget *button;
const gchar * const hello_world_accel[] = { "<Primary>h", NULL };
const gchar * const quit_accel[] = { "<Primary>q", NULL };
GMenu *appmenu;
@@ -47,6 +48,11 @@ on_startup (GApplication *app,
g_action_map_add_action_entries (G_ACTION_MAP (app), actions,
G_N_ELEMENTS (actions), app);
window = gtk_application_window_new (gtk_app);
+
+ button = gtk_button_new_with_label ("Hello world!");
+ gtk_actionable_set_action_name (GTK_ACTIONABLE (button), "app.hello-world");
+ gtk_container_add (GTK_CONTAINER (window), button);
+
gtk_application_set_accels_for_action (gtk_app,
"app.hello-world",
hello_world_accel);