summaryrefslogtreecommitdiffstats
path: root/src/helper/icon-loader.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-07-31 22:44:30 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-07-31 22:44:30 +0000
commite16723672743dc4014f4823a7326411618fcf386 (patch)
treec74f490281f8a9995b54e0480c26660eb944436d /src/helper/icon-loader.cpp
parentFixing coding style (diff)
downloadinkscape-e16723672743dc4014f4823a7326411618fcf386.tar.gz
inkscape-e16723672743dc4014f4823a7326411618fcf386.zip
Remove XGD_DATA_DIR as sugestion of su_v
Diffstat (limited to 'src/helper/icon-loader.cpp')
-rw-r--r--src/helper/icon-loader.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/helper/icon-loader.cpp b/src/helper/icon-loader.cpp
index 68326bdc9..cfbd6bfc0 100644
--- a/src/helper/icon-loader.cpp
+++ b/src/helper/icon-loader.cpp
@@ -27,8 +27,14 @@ Glib::RefPtr<Gdk::Pixbuf> sp_get_icon_pixbuf(Glib::ustring icon_name, gint size)
{
using namespace Inkscape::IO::Resource;
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- auto icon_theme = Gtk::IconTheme::get_default();
Glib::RefPtr<Gdk::Pixbuf> _icon_pixbuf;
+ static auto icon_theme = Gtk::IconTheme::get_default();
+ static bool icon_theme_set;
+ if (!icon_theme_set) {
+ icon_theme_set = true;
+ icon_theme->prepend_search_path(get_path_ustring(SYSTEM, ICONS));
+ icon_theme->prepend_search_path(get_path_ustring(USER, ICONS));
+ }
try {
if (prefs->getBool("/theme/symbolicIcons", false)) {
gchar colornamed[64];