summaryrefslogtreecommitdiffstats
path: root/src/ui/context-menu.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2008-09-16 17:15:22 +0000
committertweenk <tweenk@users.sourceforge.net>2008-09-16 17:15:22 +0000
commit9d87d30b72145fdee954992a9dc70f8c60174d7d (patch)
tree194a94ece6ed668ad7dc529de2cdd09b7565c6fe /src/ui/context-menu.cpp
parentfix leak of the arena and arenaitem (diff)
downloadinkscape-9d87d30b72145fdee954992a9dc70f8c60174d7d.tar.gz
inkscape-9d87d30b72145fdee954992a9dc70f8c60174d7d.zip
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)
Diffstat (limited to 'src/ui/context-menu.cpp')
-rw-r--r--src/ui/context-menu.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ui/context-menu.cpp b/src/ui/context-menu.cpp
index e2ce5a2e1..51b4b3f43 100644
--- a/src/ui/context-menu.cpp
+++ b/src/ui/context-menu.cpp
@@ -18,7 +18,7 @@
#include "desktop.h"
#include "document.h"
#include "message-stack.h"
-#include "prefs-utils.h"
+#include "preferences.h"
#include "ui/dialog/dialog-manager.h"
static void sp_object_type_menu(GType type, SPObject *object, SPDesktop *desktop, GtkMenu *menu);
@@ -316,13 +316,14 @@ sp_image_image_properties(GtkMenuItem */*menuitem*/, SPAnchor *anchor)
}
static gchar* getImageEditorName() {
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gchar* value = 0;
- gchar const *choices = prefs_get_string_attribute("options.bitmapeditor", "choices");
- if ( choices && choices[0] ) {
- gchar** splits = g_strsplit(choices, ",", 0);
+ Glib::ustring choices = prefs->getString("options.bitmapeditor", "choices");
+ if (!choices.empty()) {
+ gchar** splits = g_strsplit(choices.data(), ",", 0);
gint numIems = g_strv_length(splits);
- int setting = prefs_get_int_attribute_limited("options.bitmapeditor", "value", 0, 0, numIems);
+ int setting = prefs->getIntLimited("options.bitmapeditor", "value", 0, 0, numIems);
value = g_strdup(splits[setting]);
g_strfreev(splits);