diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-08-19 15:42:30 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-08-19 16:01:57 +0200 |
commit | d5e5616ae626fc68535984cb239f1f497dbf0048 (patch) | |
tree | bcf019099d3a187710ee875b4c66891137446d39 /gtk/gtkicontheme.c | |
parent | 8ae81bb3956a27d6cc17e04bdbf089882091f5a2 (diff) | |
download | gtk+-d5e5616ae626fc68535984cb239f1f497dbf0048.tar.gz |
icon-theme: Add ScaledDirectories support
For backwards compat support we don't want old implementations not
supporting scaling to see the new scaled directories, so move these
to a separate list.
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index b6066062fc..b1e02a89df 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -1085,6 +1085,7 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name) int i; GList *l; char **dirs; + char **scaled_dirs; char **themes; GtkIconThemePrivate *priv; IconTheme *theme = NULL; @@ -1169,7 +1170,9 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name) g_key_file_free (theme_file); return; } - + + scaled_dirs = g_key_file_get_string_list (theme_file, "Icon Theme", "ScaledDirectories", NULL, NULL); + theme->comment = g_key_file_get_locale_string (theme_file, "Icon Theme", "Comment", @@ -1183,7 +1186,13 @@ insert_theme (GtkIconTheme *icon_theme, const char *theme_name) for (i = 0; dirs[i] != NULL; i++) theme_subdir_load (icon_theme, theme, theme_file, dirs[i]); + if (scaled_dirs) + { + for (i = 0; scaled_dirs[i] != NULL; i++) + theme_subdir_load (icon_theme, theme, theme_file, scaled_dirs[i]); + } g_strfreev (dirs); + g_strfreev (scaled_dirs); theme->dirs = g_list_reverse (theme->dirs); |