[gtk+] GtkIconTheme: Only look at resources for hicolor
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkIconTheme: Only look at resources for hicolor
- Date: Mon, 30 Jun 2014 21:23:31 +0000 (UTC)
commit c28d938a242849354fc354468db25460c60dd849
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jun 30 16:03:03 2014 -0400
GtkIconTheme: Only look at resources for hicolor
We want to treat icons coming from resources as builtins that
are looked at as part of Hicolor.
gtk/gtkicontheme.c | 45 ++++++++++++++++++++++++---------------------
1 files changed, 24 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index 61b6e34..360e244 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3261,27 +3261,30 @@ theme_subdir_load (GtkIconTheme *icon_theme,
g_free (full_dir);
}
- for (d = icon_theme->priv->resource_paths; d; d = d->next)
- {
- full_dir = g_build_filename ((const gchar *)d->data, theme->name, subdir, NULL);
- dir = g_new0 (IconThemeDir, 1);
- dir->type = type;
- dir->is_resource = TRUE;
- dir->context = context;
- dir->size = size;
- dir->min_size = min_size;
- dir->max_size = max_size;
- dir->threshold = threshold;
- dir->dir = full_dir;
- dir->subdir = g_strdup (subdir);
- dir->scale = scale;
- dir->cache = NULL;
- dir->subdir_index = -1;
-
- if (scan_resources (icon_theme->priv, dir, full_dir))
- theme->dirs = g_list_prepend (theme->dirs, dir);
- else
- theme_dir_destroy (dir);
+ if (strcmp (theme->name, DEFAULT_THEME_NAME) == 0)
+ {
+ for (d = icon_theme->priv->resource_paths; d; d = d->next)
+ {
+ full_dir = g_build_filename ((const gchar *)d->data, theme->name, subdir, NULL);
+ dir = g_new0 (IconThemeDir, 1);
+ dir->type = type;
+ dir->is_resource = TRUE;
+ dir->context = context;
+ dir->size = size;
+ dir->min_size = min_size;
+ dir->max_size = max_size;
+ dir->threshold = threshold;
+ dir->dir = full_dir;
+ dir->subdir = g_strdup (subdir);
+ dir->scale = scale;
+ dir->cache = NULL;
+ dir->subdir_index = -1;
+
+ if (scan_resources (icon_theme->priv, dir, full_dir))
+ theme->dirs = g_list_prepend (theme->dirs, dir);
+ else
+ theme_dir_destroy (dir);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]