diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-01 17:00:00 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-01 17:00:00 +0000 |
| commit | 208ccdf9782984702f79b8ba416e67dd1e2c2dfa (patch) | |
| tree | 79d15123aa526c49c6386db6245fbfc6b7a63eaf /src/ui/widget/registered-widget.cpp | |
| parent | update to trunk (diff) | |
| parent | partial 2geom update: (diff) | |
| download | inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.tar.gz inkscape-208ccdf9782984702f79b8ba416e67dd1e2c2dfa.zip | |
update to trunk
(bzr r12588.1.32)
Diffstat (limited to 'src/ui/widget/registered-widget.cpp')
| -rw-r--r-- | src/ui/widget/registered-widget.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index ae6a7d1e0..92cb3f03d 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -49,8 +49,10 @@ RegisteredCheckButton::~RegisteredCheckButton() _toggled_connection.disconnect(); } -RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in) +RegisteredCheckButton::RegisteredCheckButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right, Inkscape::XML::Node* repr_in, SPDocument *doc_in, char const *active_str, char const *inactive_str) : RegisteredWidget<Gtk::CheckButton>() + , _active_str(active_str) + , _inactive_str(inactive_str) { init_parent(key, wr, repr_in, doc_in); @@ -88,7 +90,7 @@ RegisteredCheckButton::on_toggled() return; _wr->setUpdating (true); - write_to_xml(get_active() ? "true" : "false"); + write_to_xml(get_active() ? _active_str : _inactive_str); //The slave button is greyed out if the master button is unchecked for (std::list<Gtk::Widget*>::const_iterator i = _slavewidgets.begin(); i != _slavewidgets.end(); ++i) { (*i)->set_sensitive(get_active()); @@ -427,11 +429,11 @@ RegisteredRadioButtonPair::RegisteredRadioButtonPair (const Glib::ustring& label setProgrammatically = false; - add (*manage (new Gtk::Label (label))); - _rb1 = manage (new Gtk::RadioButton (label1, true)); + add(*Gtk::manage(new Gtk::Label(label))); + _rb1 = Gtk::manage(new Gtk::RadioButton(label1, true)); add (*_rb1); Gtk::RadioButtonGroup group = _rb1->get_group(); - _rb2 = manage (new Gtk::RadioButton (group, label2, true)); + _rb2 = Gtk::manage(new Gtk::RadioButton(group, label2, true)); add (*_rb2); _rb2->set_active(); _rb1->set_tooltip_text(tip1); |
