forked from AuroraMiddleware/gtk
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:
parent
8606e57910
commit
1f585151fd
@ -290,7 +290,6 @@ gtk_settings_init (GtkSettings *settings)
|
|||||||
guint i = 0;
|
guint i = 0;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
const gchar * const *config_dirs;
|
const gchar * const *config_dirs;
|
||||||
const gchar *config_dir;
|
|
||||||
|
|
||||||
priv = gtk_settings_get_instance_private (settings);
|
priv = gtk_settings_get_instance_private (settings);
|
||||||
settings->priv = priv;
|
settings->priv = priv;
|
||||||
@ -340,9 +339,9 @@ gtk_settings_init (GtkSettings *settings)
|
|||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
config_dirs = g_get_system_config_dirs ();
|
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))
|
if (g_file_test (path, G_FILE_TEST_EXISTS))
|
||||||
gtk_settings_load_from_key_file (settings, path, GTK_SETTINGS_SOURCE_DEFAULT);
|
gtk_settings_load_from_key_file (settings, path, GTK_SETTINGS_SOURCE_DEFAULT);
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
Loading…
Reference in New Issue
Block a user