diff options
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/tools/tool-base.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/registered-widget.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/registered-widget.h | 3 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/ui/tools/tool-base.cpp b/src/ui/tools/tool-base.cpp index 36fe26e76..72ba499de 100644 --- a/src/ui/tools/tool-base.cpp +++ b/src/ui/tools/tool-base.cpp @@ -1083,7 +1083,7 @@ void sp_event_root_menu_popup(SPDesktop *desktop, SPItem *item, GdkEvent *event) /* fixme: This is not what I want but works for now (Lauris) */ if (event->type == GDK_KEY_PRESS) { - item = desktop->getSelection()->singleItem(); + item = desktop->getSelection()->itemList().front(); } ContextMenu* CM = new ContextMenu(desktop, item); diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index 7abab25c9..c58e599ee 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -114,10 +114,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; @@ -150,7 +148,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 17c04de9f..3c8205058 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -167,7 +167,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); @@ -184,7 +184,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(); }; |
