Load settings.ini from all data dirs

An error in the loading function was making us load the file from
the first data dir repeatedly, instead.

https://bugzilla.gnome.org/show_bug.cgi?id=757377
This commit is contained in:
Matthias Clasen 2015-10-31 18:13:29 -04:00
parent 8606e57910
commit 1f585151fd

View File

@ -290,7 +290,6 @@ gtk_settings_init (GtkSettings *settings)
guint i = 0;
gchar *path;
const gchar * const *config_dirs;
const gchar *config_dir;
priv = gtk_settings_get_instance_private (settings);
settings->priv = priv;
@ -340,9 +339,9 @@ gtk_settings_init (GtkSettings *settings)
g_free (path);
config_dirs = g_get_system_config_dirs ();
for (config_dir = *config_dirs; *config_dirs != NULL; config_dirs++)
for (i = 0; config_dirs[i] != NULL; i++)
{
path = g_build_filename (config_dir, "gtk-3.0", "settings.ini", NULL);
path = g_build_filename (config_dirs[i], "gtk-3.0", "settings.ini", NULL);
if (g_file_test (path, G_FILE_TEST_EXISTS))
gtk_settings_load_from_key_file (settings, path, GTK_SETTINGS_SOURCE_DEFAULT);
g_free (path);