X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fextension%2Finit.cpp;h=9a5aea86cd1a343bbdf2ee521d31334e2042988e;hb=4852f347df5405e934e2ccd5b30597d196f3949c;hp=940726df58e095386c212b1d0b2790f5d92b65d6;hpb=ff86396d7bac9863faecc84122d01bd4c5a18606;p=inkscape.git diff --git a/src/extension/init.cpp b/src/extension/init.cpp index 940726df5..9a5aea86c 100644 --- a/src/extension/init.cpp +++ b/src/extension/init.cpp @@ -59,7 +59,7 @@ #ifdef WITH_LIBWPG #include "internal/wpg-input.h" #endif -#include "prefs-utils.h" +#include "preferences.h" #include "io/sys.h" #ifdef WITH_IMAGE_MAGICK @@ -127,7 +127,8 @@ static void update_pref(gchar const *pref_path, gchar const *pref_attr, gchar const *pref_default) // , GSList *extension_family) { - gchar const *pref = prefs_get_string_attribute(pref_path,pref_attr); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + Glib::ustring pref = prefs->getString(pref_path, pref_attr); /* gboolean missing=TRUE; for (GSList *list = extension_family; list; list = g_slist_next(list)) { @@ -139,8 +140,8 @@ update_pref(gchar const *pref_path, gchar const *pref_attr, if (!strcmp(extension->get_id(),pref)) missing=FALSE; } */ - if (!Inkscape::Extension::db.get( pref ) /*missing*/) { - prefs_set_string_attribute(pref_path, pref_attr, pref_default); + if (!Inkscape::Extension::db.get( pref.data() ) /*missing*/) { + prefs->setString(pref_path, pref_attr, pref_default); } } @@ -154,6 +155,8 @@ update_pref(gchar const *pref_path, gchar const *pref_attr, void init() { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + /* TODO: Change to Internal */ Internal::Svg::init(); Internal::Svgz::init(); @@ -161,7 +164,7 @@ init() //Internal::EpsOutput::init(); // disabled, to be deleted, replaced by CairoEpsOutput Internal::PrintPS::init(); #ifdef HAVE_CAIRO_PDF - if (prefs_get_int_attribute("options.useoldpdfexporter", "value", 1) == 1) { + if (prefs->getInt("options.useoldpdfexporter", "value", 1) == 1) { //g_print ("Using CairoPdfOutput: old pdf exporter\n"); Internal::CairoPdfOutput::init(); Internal::PrintCairoPDF::init();