diff options
| author | Ted Gould <ted@gould.cx> | 2008-10-27 18:03:09 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-10-27 18:03:09 +0000 |
| commit | 7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902 (patch) | |
| tree | 7d3a2b95b84a03a19cb132cdf88bea0ab6dc4773 /src/extension/error-file.cpp | |
| parent | Merging from trunk (diff) | |
| download | inkscape-7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902.tar.gz inkscape-7dbe11bc23efa5f51a9b84e7d0f6dd16e63e0902.zip | |
From trunk
(bzr r6885)
Diffstat (limited to 'src/extension/error-file.cpp')
| -rw-r--r-- | src/extension/error-file.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/extension/error-file.cpp b/src/extension/error-file.cpp index ec2878f5d..7e40522b3 100644 --- a/src/extension/error-file.cpp +++ b/src/extension/error-file.cpp @@ -16,7 +16,7 @@ #include "inkscape.h" -#include "prefs-utils.h" +#include "preferences.h" #include "dialogs/extensions.h" #include "extension/extension.h" @@ -24,7 +24,7 @@ /** The name and group of the preference to say whether the error dialog should be shown on startup. */ -#define PREFERENCE_ID "dialogs.extension-error", "show-on-startup" +#define PREFERENCE_ID "/dialogs/extension-error/show-on-startup" namespace Inkscape { namespace Extension { @@ -59,10 +59,11 @@ ErrorFileNotice::ErrorFileNotice (void) : Gtk::VBox * vbox = get_vbox(); /* This is some filler text, needs to change before relase */ + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); checkbutton = Gtk::manage(new Gtk::CheckButton(_("Show dialog on startup"))); vbox->pack_start(*checkbutton, true, false, 5); checkbutton->show(); - checkbutton->set_active(prefs_get_int_attribute(PREFERENCE_ID, 1) == 0 ? false : true); + checkbutton->set_active(prefs->getBool(PREFERENCE_ID, true)); checkbutton->signal_toggled().connect(sigc::mem_fun(this, &ErrorFileNotice::checkbox_toggle)); @@ -81,7 +82,8 @@ void ErrorFileNotice::checkbox_toggle (void) { // std::cout << "Toggle value" << std::endl; - prefs_set_int_attribute(PREFERENCE_ID, checkbutton->get_active() ? 1 : 0); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setBool(PREFERENCE_ID, checkbutton->get_active()); } /** \brief Shows the dialog @@ -92,7 +94,8 @@ ErrorFileNotice::checkbox_toggle (void) int ErrorFileNotice::run (void) { - if (prefs_get_int_attribute(PREFERENCE_ID, 1) == 0) + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + if (!prefs->getBool(PREFERENCE_ID, true)) return 0; return Gtk::Dialog::run(); } |
