diff options
| author | Martin Owens <doctormo@gmail.com> | 2017-06-28 07:04:16 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2017-06-28 07:04:16 +0000 |
| commit | cf457eea72b81850da5503d0091952871135c1fd (patch) | |
| tree | 3709bcf46a0152434a89ed68bbb343a8d45408dd /src/widgets/icon.cpp | |
| parent | Update dxf_input.py for LP Bug #1700582 (diff) | |
| download | inkscape-cf457eea72b81850da5503d0091952871135c1fd.tar.gz inkscape-cf457eea72b81850da5503d0091952871135c1fd.zip | |
Refactor profile directory use and promote IO::Resource get_path and get_filename methods
Diffstat (limited to 'src/widgets/icon.cpp')
| -rw-r--r-- | src/widgets/icon.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/widgets/icon.cpp b/src/widgets/icon.cpp index 885deaab7..730fe3e31 100644 --- a/src/widgets/icon.cpp +++ b/src/widgets/icon.cpp @@ -34,6 +34,7 @@ #include "display/drawing-item.h" #include "display/drawing.h" #include "io/sys.h" +#include "io/resource.h" #include "sp-root.h" #include "sp-namedview.h" #include "util/units.h" @@ -1237,14 +1238,15 @@ GdkPixbuf *get_cached_pixbuf(Glib::ustring const &key) { std::list<gchar*> &IconImpl::icons_svg_paths() { + using namespace Inkscape::IO::Resource; static std::list<gchar *> sources; static bool initialized = false; if (!initialized) { // Fall back from user prefs dir into system locations. - gchar *userdir = Inkscape::Application::profile_path("icons"); - sources.push_back(g_build_filename(userdir,"icons.svg", NULL)); - sources.push_back(g_build_filename(INKSCAPE_PIXMAPDIR, "icons.svg", NULL)); - g_free(userdir); + // doctormo 2017 hackfest - I've left this modification very light + // because there is a refactoring of the icons underway. + sources.push_back(g_strdup(get_path(USER, ICONS, "icons.svg"))); + sources.push_back(g_strdup(get_path(SYSTEM, ICONS, "icons.svg"))); initialized = true; } return sources; |
