summaryrefslogtreecommitdiff
path: root/gtk/gtkmain.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-09-27 18:40:42 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-09-27 18:40:42 +0000
commitb3d5231371a7e0e73c934ed61cc3fb919fda727e (patch)
treea44bade3b30e83a5941ec08a8569afe231dc5bfb /gtk/gtkmain.c
parentc7777d8accba34a38c0df2a7ee39ac2b2b64b221 (diff)
downloadgdk-pixbuf-b3d5231371a7e0e73c934ed61cc3fb919fda727e.tar.gz
Fix #153082:
2004-09-27 Matthias Clasen <mclasen@redhat.com> Fix #153082: * gtk/gtkmain.c (do_pre_parse_initialization): Don't call gdk_parse_args() here, we don't want to parse args twice. (gtk_init_with_args): Add the ugid check here as well. (gtk_parse_args): Add the gdk options to the main option group as well.
Diffstat (limited to 'gtk/gtkmain.c')
-rw-r--r--gtk/gtkmain.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index 8a7ef3358..0d3d5e27b 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -437,7 +437,7 @@ do_pre_parse_initialization (int *argc,
g_warning ("Locale not supported by C library.\n\tUsing the fallback 'C' locale.");
}
- gdk_parse_args (argc, argv);
+ gdk_pre_parse_libgtk_only ();
gdk_event_handler_set ((GdkEventFunc)gtk_main_do_event, NULL, NULL);
#ifdef G_ENABLE_DEBUG
@@ -567,10 +567,13 @@ gtk_init_with_args (int *argc,
GOptionContext *context;
GOptionGroup *gtk_group;
gboolean retval;
-
+
if (gtk_initialized)
return TRUE;
+ if (!check_setugid ())
+ return FALSE;
+
gtk_group = gtk_get_option_group (TRUE);
context = g_option_context_new (parameter_string);
@@ -578,7 +581,6 @@ gtk_init_with_args (int *argc,
if (entries)
g_option_context_add_main_entries (context, entries, translation_domain);
-
retval = g_option_context_parse (context, argc, argv, error);
g_option_context_free (context);
@@ -623,6 +625,7 @@ gtk_parse_args (int *argc,
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));
g_option_context_parse (option_context, argc, argv, NULL);
g_option_context_free (option_context);