diff options
author | Ryan Lortie <desrt@desrt.ca> | 2014-02-06 17:33:44 +0000 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2014-02-06 17:42:33 +0000 |
commit | 974c8432532c989bfa97832572200b86e7723ea2 (patch) | |
tree | d14618850c1f9957f559d64a43a1dfa2ca6c7503 /gtk | |
parent | 7faf5ee765496148eb59cbe3f848f7bcff03bb39 (diff) | |
download | gtk+-974c8432532c989bfa97832572200b86e7723ea2.tar.gz |
GtkApplication: install gtk option group
Install Gtk's GOptionGroup in GApplication just before commandline
arguments are parsed.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkapplication.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkapplication.c b/gtk/gtkapplication.c index 8d9a4322d1..a0451e9adb 100644 --- a/gtk/gtkapplication.c +++ b/gtk/gtkapplication.c @@ -546,6 +546,16 @@ gtk_application_shutdown (GApplication *g_application) ->shutdown (g_application); } +static gboolean +gtk_application_local_command_line (GApplication *application, + gchar ***arguments, + gint *exit_status) +{ + g_application_add_option_group (application, gtk_get_option_group (FALSE)); + + return G_APPLICATION_CLASS (gtk_application_parent_class)->local_command_line (application, arguments, exit_status); +} + static void gtk_application_add_platform_data (GApplication *application, GVariantBuilder *builder) @@ -780,6 +790,7 @@ gtk_application_class_init (GtkApplicationClass *class) object_class->set_property = gtk_application_set_property; object_class->finalize = gtk_application_finalize; + application_class->local_command_line = gtk_application_local_command_line; application_class->add_platform_data = gtk_application_add_platform_data; application_class->before_emit = gtk_application_before_emit; application_class->after_emit = gtk_application_after_emit; |