summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2016-07-24 15:05:29 +0000
committerjabiertxof <info@marker.es>2016-07-24 15:05:29 +0000
commit06caba8f2caeb07011e492d7218f0b8f6b28e801 (patch)
tree2b81440d4cd726919a6226d8036156eb55c206bb /src/ui
parentOrder and cleanup of some LPE (diff)
downloadinkscape-06caba8f2caeb07011e492d7218f0b8f6b28e801.tar.gz
inkscape-06caba8f2caeb07011e492d7218f0b8f6b28e801.zip
Fises to toggle button and coding style
(bzr r15021)
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/widget/registered-widget.cpp6
-rw-r--r--src/ui/widget/registered-widget.h3
2 files changed, 3 insertions, 6 deletions
diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp
index 298377af3..572845668 100644
--- a/src/ui/widget/registered-widget.cpp
+++ b/src/ui/widget/registered-widget.cpp
@@ -113,10 +113,8 @@ RegisteredToggleButton::~RegisteredToggleButton()
_toggled_connection.disconnect();
}
-RegisteredToggleButton::RegisteredToggleButton (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)
+RegisteredToggleButton::RegisteredToggleButton (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 *icon_active, char const *icon_inactive)
: RegisteredWidget<Gtk::ToggleButton>()
- , _active_str(active_str)
- , _inactive_str(inactive_str)
{
init_parent(key, wr, repr_in, doc_in);
setProgrammatically = false;
@@ -149,7 +147,7 @@ RegisteredToggleButton::on_toggled()
return;
_wr->setUpdating (true);
- write_to_xml(get_active() ? _active_str : _inactive_str);
+ write_to_xml(get_active() ? "true" : "false");
//The slave button is greyed out if the master button is untoggled
for (std::list<Gtk::Widget*>::const_iterator i = _slavewidgets.begin(); i != _slavewidgets.end(); ++i) {
(*i)->set_sensitive(get_active());
diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h
index 9d2489712..ab2e4c8e4 100644
--- a/src/ui/widget/registered-widget.h
+++ b/src/ui/widget/registered-widget.h
@@ -166,7 +166,7 @@ protected:
class RegisteredToggleButton : public RegisteredWidget<Gtk::ToggleButton> {
public:
virtual ~RegisteredToggleButton();
- RegisteredToggleButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right=true, Inkscape::XML::Node* repr_in=NULL, SPDocument *doc_in=NULL, char const *active_str = "true", char const *inactive_str = "false");
+ RegisteredToggleButton (const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Registry& wr, bool right=true, Inkscape::XML::Node* repr_in=NULL, SPDocument *doc_in=NULL, char const *icon_active = "true", char const *icon_inactive = "false");
void setActive (bool);
@@ -183,7 +183,6 @@ public:
// if a callback checks it, it must reset it back to false
protected:
- char const *_active_str, *_inactive_str;
sigc::connection _toggled_connection;
void on_toggled();
};