From 41b862f1c4eaea48bdd0d546e2bb31907f15857b Mon Sep 17 00:00:00 2001 From: Jan Lingscheid Date: Wed, 18 Oct 2017 16:03:34 +0200 Subject: Refactor Util::ptr_shared Util::ptr_shared was only used in its specialization, so it is now refactored into a non-template class. Using it with arbitary classes was dangerous anyway. --- src/io/resource.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/io/resource.cpp') diff --git a/src/io/resource.cpp b/src/io/resource.cpp index bc6c9f7b0..c3cd9e403 100644 --- a/src/io/resource.cpp +++ b/src/io/resource.cpp @@ -113,10 +113,10 @@ gchar *_get_path(Domain domain, Type type, char const *filename) return path; } -Util::ptr_shared get_path(Domain domain, Type type, char const *filename) +Util::ptr_shared get_path(Domain domain, Type type, char const *filename) { char *path = _get_path(domain, type, filename); - Util::ptr_shared result=Util::share_string(path); + Util::ptr_shared result=Util::share_string(path); g_free(path); return result; } -- cgit v1.2.3 From 0ec8457e3dfde14a9f1be1e65ddd0aa35f9dcd7c Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Fri, 20 Oct 2017 22:54:21 +0200 Subject: Define INKSCAPE_FONTSDIR and add USER/SYSTEM resource paths for fonts (Note we always had an empty /share/fonts directory that didn't seem to have any purpose yet) --- src/io/resource.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/io/resource.cpp') diff --git a/src/io/resource.cpp b/src/io/resource.cpp index c3cd9e403..3f970dfa1 100644 --- a/src/io/resource.cpp +++ b/src/io/resource.cpp @@ -52,6 +52,7 @@ gchar *_get_path(Domain domain, Type type, char const *filename) case APPICONS: temp = INKSCAPE_APPICONDIR; break; case EXTENSIONS: temp = INKSCAPE_EXTENSIONDIR; break; case FILTERS: temp = INKSCAPE_FILTERDIR; break; + case FONTS: temp = INKSCAPE_FONTSDIR; break; case GRADIENTS: temp = INKSCAPE_GRADIENTSDIR; break; case ICONS: temp = INKSCAPE_PIXMAPDIR; break; case KEYS: temp = INKSCAPE_KEYSDIR; break; @@ -87,6 +88,7 @@ gchar *_get_path(Domain domain, Type type, char const *filename) switch (type) { case EXTENSIONS: name = "extensions"; break; case FILTERS: name = "filters"; break; + case FONTS: name = "fonts"; break; case GRADIENTS: name = "gradients"; break; case ICONS: name = "icons"; break; case KEYS: name = "keys"; break; -- cgit v1.2.3