diff options
| author | Bruno Dilly <bruno.dilly@gmail.com> | 2007-08-06 18:32:13 +0000 |
|---|---|---|
| committer | bdilly <bdilly@users.sourceforge.net> | 2007-08-06 18:32:13 +0000 |
| commit | f006ebdee5b2f29127a152978ac72e41f61ced33 (patch) | |
| tree | d35a9cc73d84182ad90838bcd77cda2e3574679d /src/ui/widget/preferences-widget.cpp | |
| parent | Add Gail and Diederik; correct Danilo's name. (diff) | |
| download | inkscape-f006ebdee5b2f29127a152978ac72e41f61ced33.tar.gz inkscape-f006ebdee5b2f29127a152978ac72e41f61ced33.zip | |
adds export to ocal feature without dialog window
(bzr r3398)
Diffstat (limited to 'src/ui/widget/preferences-widget.cpp')
| -rw-r--r-- | src/ui/widget/preferences-widget.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index 00d8b5a26..a6302aa9d 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -3,8 +3,9 @@ * * Authors: * Marco Scholten + * Bruno Dilly <bruno.dilly@gmail.com> * - * Copyright (C) 2004, 2006 Authors + * Copyright (C) 2004, 2006, 2007 Authors * * Released under GNU GPL. Read the file 'COPYING' for more information. */ @@ -266,6 +267,25 @@ void PrefCombo::on_changed() } } +void PrefEntry::init(const std::string& prefs_path, const std::string& attr, + bool visibility) +{ + _prefs_path = prefs_path; + _attr = attr; + this->set_invisible_char('*'); + this->set_visibility(visibility); + this->set_text(prefs_get_string_attribute(_prefs_path.c_str(), _attr.c_str())); +} + +void PrefEntry::on_activate() +{ + if (this->is_visible()) //only take action if user changed value + { + prefs_set_string_attribute(_prefs_path.c_str(), _attr.c_str(), this->get_text().c_str()); + } + return; +} + } // namespace Widget } // namespace UI } // namespace Inkscape |
