diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2008-09-16 17:15:22 +0000 |
|---|---|---|
| committer | tweenk <tweenk@users.sourceforge.net> | 2008-09-16 17:15:22 +0000 |
| commit | 9d87d30b72145fdee954992a9dc70f8c60174d7d (patch) | |
| tree | 194a94ece6ed668ad7dc529de2cdd09b7565c6fe /src/ui/dialog/extension-editor.cpp | |
| parent | fix leak of the arena and arenaitem (diff) | |
| download | inkscape-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/dialog/extension-editor.cpp')
| -rw-r--r-- | src/ui/dialog/extension-editor.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/dialog/extension-editor.cpp b/src/ui/dialog/extension-editor.cpp index d26e05f07..a92087668 100644 --- a/src/ui/dialog/extension-editor.cpp +++ b/src/ui/dialog/extension-editor.cpp @@ -23,7 +23,7 @@ #include "extension-editor.h" #include "verbs.h" -#include "prefs-utils.h" +#include "preferences.h" #include "interface.h" #include "extension/extension.h" @@ -83,9 +83,10 @@ ExtensionEditor::ExtensionEditor() vbox_page->pack_start(*notebook, true, true, 0); Inkscape::Extension::db.foreach(dbfunc, this); - - gchar const * defaultext = prefs_get_string_attribute("dialogs.extensioneditor", "selected-extension"); - if (defaultext == NULL) defaultext = "org.inkscape.input.svg"; + + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + Glib::ustring defaultext = prefs->getString("dialogs.extensioneditor", "selected-extension"); + if (defaultext.empty()) defaultext = "org.inkscape.input.svg"; this->setExtension(defaultext); show_all_children(); @@ -135,7 +136,8 @@ ExtensionEditor::on_pagelist_selection_changed (void) Glib::ustring name = row[_page_list_columns._col_name]; /* Set the selection in the preferences */ - prefs_set_string_attribute("dialogs.extensioneditor", "selected-extension", id.c_str()); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setString("dialogs.extensioneditor", "selected-extension", id); /* Adjust the dialog's title */ gchar title[500]; |
