summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-09-28 04:22:04 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-09-28 04:22:04 +0000
commit615342e33b2985cf7b6b0bc37a69841cc12b9ec2 (patch)
treee9d6f0b3beb865d50f29febffd9bf5e3df7a7d51 /gtk/gtkmain.c
parentb3d5231371a7e0e73c934ed61cc3fb919fda727e (diff)
downloadgtk+-615342e33b2985cf7b6b0bc37a69841cc12b9ec2.tar.gz
Use gtk_get_option_group() to obtain an option group with correctly set
2004-09-28 Matthias Clasen <mclasen@redhat.com> * gtk/gtkmain.c (gtk_parse_args): Use gtk_get_option_group() to obtain an option group with correctly set pre- and post- parse hooks, instead of manually calling the hooks. This fixes a problem with setting the program class in the gdk preparse hook. (#153788, Robert Ă–gren)
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 0d3d5e27b6..ec6c9f8cb2 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -611,6 +611,7 @@ gtk_parse_args (int *argc,
char ***argv)
{
GOptionContext *option_context;
+ GOptionGroup *gtk_group;
if (gtk_initialized)
return TRUE;
@@ -618,20 +619,14 @@ gtk_parse_args (int *argc,
if (!check_setugid ())
return FALSE;
- do_pre_parse_initialization (argc, argv);
-
option_context = g_option_context_new (NULL);
g_option_context_set_ignore_unknown_options (option_context, TRUE);
g_option_context_set_help_enabled (option_context, FALSE);
-
- g_option_context_add_main_entries (option_context, gtk_args, GETTEXT_PACKAGE);
- gdk_add_option_entries_libgtk_only (g_option_context_get_main_group (option_context));
-
+ gtk_group = gtk_get_option_group (FALSE);
+ g_option_context_set_main_group (option_context, gtk_group);
g_option_context_parse (option_context, argc, argv, NULL);
g_option_context_free (option_context);
- do_post_parse_initialization (argc, argv);
-
return TRUE;
}