From cf457eea72b81850da5503d0091952871135c1fd Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 28 Jun 2017 09:04:16 +0200 Subject: Refactor profile directory use and promote IO::Resource get_path and get_filename methods --- src/extension/init.cpp | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) (limited to 'src/extension/init.cpp') diff --git a/src/extension/init.cpp b/src/extension/init.cpp index af7af2cb1..f2e74377d 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -60,6 +60,7 @@ #endif #include "preferences.h" #include "io/sys.h" +#include "io/resource.h" #ifdef WITH_DBUS #include "dbus/dbus-init.h" #endif @@ -106,6 +107,8 @@ #include "init.h" +using namespace Inkscape::IO::Resource; + namespace Inkscape { namespace Extension { @@ -113,7 +116,7 @@ namespace Extension { the extension directory and parsed */ #define SP_MODULE_EXTENSION "inx" -static void build_module_from_dir(gchar const *dirname); +static void build_module_from_domain(Domain domain); static void check_extensions(); /** @@ -150,7 +153,7 @@ update_pref(Glib::ustring const &pref_path, * Invokes the init routines for internal modules. * * This should be a list of all the internal modules that need to initialized. This is just a - * convinent place to put them. Also, this function calls build_module_from_dir to parse the + * convinent place to put them. Also, this function calls build_module_from_domain to parse the * Inkscape extensions directory. */ void @@ -240,18 +243,8 @@ init() Internal::Filter::Filter::filters_all(); - /* Load search path for extensions */ - if (Inkscape::Extension::Extension::search_path.size() == 0) - { - Inkscape::Extension::Extension::search_path.push_back(Inkscape::Application::profile_path("extensions")); - - Inkscape::Extension::Extension::search_path.push_back(g_strdup(INKSCAPE_EXTENSIONDIR)); - - } - - for (unsigned int i=0; i Date: Fri, 30 Jun 2017 15:02:50 +0200 Subject: Replace ImageMagic with GraphicsMagic ... just a matter of taste. But both wanna be initialized: fixed. --- src/extension/init.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/extension/init.cpp') diff --git a/src/extension/init.cpp b/src/extension/init.cpp index f2e74377d..a40196a74 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -66,6 +66,7 @@ #endif #ifdef WITH_IMAGE_MAGICK +#include #include "internal/bitmap/adaptiveThreshold.h" #include "internal/bitmap/addNoise.h" #include "internal/bitmap/blur.h" @@ -204,6 +205,8 @@ init() /* Raster Effects */ #ifdef WITH_IMAGE_MAGICK + Magick::InitializeMagick(NULL); + Internal::Bitmap::AdaptiveThreshold::init(); Internal::Bitmap::AddNoise::init(); Internal::Bitmap::Blur::init(); -- cgit v1.2.3