]> Pileus Git - ~andy/gtk/commitdiff
Fix #153082:
authorMatthias Clasen <mclasen@redhat.com>
Mon, 27 Sep 2004 18:40:42 +0000 (18:40 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 27 Sep 2004 18:40:42 +0000 (18:40 +0000)
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.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkmain.c

index 468149f8b1d6a9023af5d981fc7d37feaea3f1b9..4d7be4b374006e372def87a6dab9f1bbd86c585c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
+
 2004-09-27  Paolo Borelli  <pborelli@katamail.com>
 
        * gtk/Makefile.am:
index 468149f8b1d6a9023af5d981fc7d37feaea3f1b9..4d7be4b374006e372def87a6dab9f1bbd86c585c 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2004-09-27  Paolo Borelli  <pborelli@katamail.com>
 
        * gtk/Makefile.am:
index 468149f8b1d6a9023af5d981fc7d37feaea3f1b9..4d7be4b374006e372def87a6dab9f1bbd86c585c 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2004-09-27  Paolo Borelli  <pborelli@katamail.com>
 
        * gtk/Makefile.am:
index 468149f8b1d6a9023af5d981fc7d37feaea3f1b9..4d7be4b374006e372def87a6dab9f1bbd86c585c 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2004-09-27  Paolo Borelli  <pborelli@katamail.com>
 
        * gtk/Makefile.am:
index 8a7ef3358897d569a83444fdaa0a2e7d28a2d162..0d3d5e27b61d537ccba653951e1df6dbce457bdb 100644 (file)
@@ -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);