diff options
| author | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-12-25 23:46:18 +0000 |
|---|---|---|
| committer | Jabier Arraiza <jabier.arraiza@marker.es> | 2017-12-25 23:46:18 +0000 |
| commit | 60efec48f2861fba5e02ca4fff61bfdcef33f56f (patch) | |
| tree | 2dbcec0c9c8d1453c422c10a53d691203f18e965 /src/ui/widget/ink-select-one-action.cpp | |
| parent | Fix start anchors (diff) | |
| parent | Merge about-box Gtkmm changes (diff) | |
| download | inkscape-60efec48f2861fba5e02ca4fff61bfdcef33f56f.tar.gz inkscape-60efec48f2861fba5e02ca4fff61bfdcef33f56f.zip | |
Merge branch 'master' into powerpencilII
Diffstat (limited to 'src/ui/widget/ink-select-one-action.cpp')
| -rw-r--r-- | src/ui/widget/ink-select-one-action.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/ui/widget/ink-select-one-action.cpp b/src/ui/widget/ink-select-one-action.cpp index 40bafecc2..dedfb8894 100644 --- a/src/ui/widget/ink-select-one-action.cpp +++ b/src/ui/widget/ink-select-one-action.cpp @@ -31,22 +31,22 @@ #include <gtkmm/image.h> InkSelectOneAction* InkSelectOneAction::create(const Glib::ustring &name, - const Glib::ustring &label, + const Glib::ustring &group_label, const Glib::ustring &tooltip, const Glib::ustring &stock_id, Glib::RefPtr<Gtk::ListStore> store ) { - return new InkSelectOneAction(name, label, tooltip, stock_id, store); + return new InkSelectOneAction(name, group_label, tooltip, stock_id, store); } InkSelectOneAction::InkSelectOneAction (const Glib::ustring &name, - const Glib::ustring &label, + const Glib::ustring &group_label, const Glib::ustring &tooltip, const Glib::ustring &stock_id, Glib::RefPtr<Gtk::ListStore> store ) : - Gtk::Action(name, stock_id, label, tooltip), + Gtk::Action(name, stock_id, group_label, tooltip), _name( name ), - _label( label ), + _group_label( group_label ), _tooltip( tooltip ), _stock_id( stock_id ), _store (store), @@ -136,6 +136,11 @@ Gtk::Widget* InkSelectOneAction::create_tool_item_vfunc() { Gtk::Box* box = Gtk::manage(new Gtk::Box()); tool_item->add (*box); + if (_use_group_label) { + Gtk::Label *group_label = Gtk::manage (new Gtk::Label( _group_label + ": " )); + box->add( *group_label ); + } + Gtk::RadioAction::Group group; int index = 0; auto children = _store->children(); @@ -167,6 +172,10 @@ Gtk::Widget* InkSelectOneAction::create_tool_item_vfunc() { box->add (*item); } + if (_radioaction) { + _radioaction->set_current_value (_active); + } + _radioaction->signal_changed().connect( sigc::mem_fun(*this, &InkSelectOneAction::on_changed_radioaction)); } else { |
