gtk+ r21380 - in trunk: . gtk



Author: cosimoc
Date: Sat Sep 13 19:01:13 2008
New Revision: 21380
URL: http://svn.gnome.org/viewvc/gtk+?rev=21380&view=rev

Log:
2008-09-13  Cosimo Cecchi  <cosimoc gnome org>

	Bug 552153 â GtkModules loading with XSettings doesn't work if the
	GTK_MODULES env var isn't set.

	* gtk/gtkmain.c: (do_post_parse_initialization):
	* gtk/gtkmodules.c: (_gtk_modules_init):
	Call _gtk_modules_init () even if gtk_modules_string is NULL, so
	that GtkModules specified with XSettings could be loaded.


Modified:
   trunk/ChangeLog
   trunk/gtk/gtkmain.c
   trunk/gtk/gtkmodules.c

Modified: trunk/gtk/gtkmain.c
==============================================================================
--- trunk/gtk/gtkmain.c	(original)
+++ trunk/gtk/gtkmain.c	Sat Sep 13 19:01:13 2008
@@ -699,6 +699,10 @@
       _gtk_modules_init (argc, argv, gtk_modules_string->str);
       g_string_free (gtk_modules_string, TRUE);
     }
+  else
+    {
+      _gtk_modules_init (argc, argv, NULL);
+    }
 }
 
 

Modified: trunk/gtk/gtkmodules.c
==============================================================================
--- trunk/gtk/gtkmodules.c	(original)
+++ trunk/gtk/gtkmodules.c	Sat Sep 13 19:01:13 2008
@@ -511,11 +511,13 @@
 		    G_CALLBACK (display_opened_cb), 
 		    NULL);
 
-  /* Modules specified in the GTK_MODULES environment variable
-   * or on the command line are always loaded, so we'll just leak 
-   * the refcounts.
-   */
-  g_slist_free (load_modules (gtk_modules_args));
+  if (gtk_modules_args) {
+    /* Modules specified in the GTK_MODULES environment variable
+     * or on the command line are always loaded, so we'll just leak 
+     * the refcounts.
+     */
+    g_slist_free (load_modules (gtk_modules_args));
+  }
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]