After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 162930 - rc files not read if gtk_init(NULL, NULL) used
rc files not read if gtk_init(NULL, NULL) used
Status: RESOLVED DUPLICATE of bug 161668
Product: gtk+
Classification: Platform
Component: Widget: Other
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-01-04 17:23 UTC by Billy Biggs
Modified: 2005-01-04 17:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Billy Biggs 2005-01-04 17:23:36 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", &gtk_theme_name, NULL);
    if (gtk_theme_name) fprintf (stdout, "  Theme is %s.\n", gtk_theme_name);
    return 0;
}
Comment 1 Matthias Clasen 2005-01-04 17:56:40 UTC
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 ***