GNOME Bugzilla – Bug 162930
rc files not read if gtk_init(NULL, NULL) used
Last modified: 2005-01-04 17:56:40 UTC
1. Make sure no XSETTINGS servers are running. 2. Set a theme name in ~/.gtkrc-2.0, for example: gtk-theme-name = "Industrial" 3. Run the following application. When gtk_init(NULL, NULL) is used, the theme returned is "Default". When gtk_init(&argc, &argv) is used, the theme returned is "Industrial". The presence of arguments, even if blank, should not change how the RC files are parsed. This code breaks on GTK+ 2.6.0 but not on GTK+ 2.4 and earlier. int main (int argc, char **argv) { GtkSettings *settings; gchar *gtk_theme_name = 0; // WORKS: gtk_init (&argc, &argv); gtk_init (NULL, NULL); settings = gtk_settings_get_default (); g_object_get (settings, "gtk-theme-name", >k_theme_name, NULL); if (gtk_theme_name) fprintf (stdout, " Theme is %s.\n", gtk_theme_name); return 0; }
I believe this is a duplicate of bug 161668 which is already fixed in cvs glib. *** This bug has been marked as a duplicate of 161668 ***