examples/bp/bloatpad.c: Declare variables at top-of-block

This is to ensure that the code will build on pre-C99 compilers.
This commit is contained in:
Chun-wei Fan 2019-03-13 13:03:21 +08:00 committed by Christoph Reiter
parent 397471d604
commit 988d2dd077

View File

@ -537,6 +537,7 @@ bloat_pad_startup (GApplication *application)
{ "win.justify::center", { "<Primary>m", NULL } }, { "win.justify::center", { "<Primary>m", NULL } },
{ "win.justify::right", { "<Primary>r", NULL } } { "win.justify::right", { "<Primary>r", NULL } }
}; };
const gchar *new_accels[] = { "<Primary>n", "<Primary>t", NULL };
G_APPLICATION_CLASS (bloat_pad_parent_class) G_APPLICATION_CLASS (bloat_pad_parent_class)
->startup (application); ->startup (application);
@ -604,7 +605,6 @@ bloat_pad_startup (GApplication *application)
g_object_unref (item); g_object_unref (item);
g_object_unref (icon); g_object_unref (icon);
const gchar *new_accels[] = { "<Primary>n", "<Primary>t", NULL };
gtk_application_set_accels_for_action (GTK_APPLICATION (application), "app.new", new_accels); gtk_application_set_accels_for_action (GTK_APPLICATION (application), "app.new", new_accels);
dump_accels (GTK_APPLICATION (application)); dump_accels (GTK_APPLICATION (application));