From 9d87d30b72145fdee954992a9dc70f8c60174d7d Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Tue, 16 Sep 2008 17:15:22 +0000 Subject: Refactored preferences handling into a new version of the Inkscape::Preferences class. Removed all use of prefs_get_string_attribute(), pref_path_get_nth_child() and create_pref() in favor of the new API. Replaced some "0 or 1" integer preferences with booleans. (bzr r6823) --- src/extension/param/notebook.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/extension/param/notebook.cpp') diff --git a/src/extension/param/notebook.cpp b/src/extension/param/notebook.cpp index 1a2623fbf..bce6bc3d0 100644 --- a/src/extension/param/notebook.cpp +++ b/src/extension/param/notebook.cpp @@ -27,7 +27,7 @@ #include #include -#include "prefs-utils.h" +#include "preferences.h" #include "document-private.h" #include "sp-object.h" @@ -263,11 +263,12 @@ ParamNotebook::ParamNotebook (const gchar * name, const gchar * guitext, const g } gchar * pref_name = this->pref_name(); - const gchar * paramval = prefs_get_string_attribute(PREF_DIR, pref_name); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + Glib::ustring paramval = prefs->getString(PREF_DIR, pref_name); g_free(pref_name); - if (paramval != NULL) - defaultval = paramval; + if (!paramval.empty()) + defaultval = paramval.data(); if (defaultval != NULL) _value = g_strdup(defaultval); // allocate space for _value -- cgit v1.2.3