a better way to build ArdourDropdowns from Actions
This commit is contained in:
@@ -195,3 +195,9 @@ ArdourDropdown::default_text_handler (std::string const& text) {
|
||||
set_text (text);
|
||||
StateChanged (); /* EMIT SIGNAL */
|
||||
}
|
||||
|
||||
void
|
||||
ArdourDropdown::append (Glib::RefPtr<Action> action)
|
||||
{
|
||||
_menu.items().push_back (Menu_Helpers::MenuElem (action->get_short_label(), sigc::mem_fun (action.get(), &Action::activate)));
|
||||
}
|
||||
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
|
||||
void clear_items ();
|
||||
void AddMenuElem (Gtk::Menu_Helpers::Element e);
|
||||
void append (Glib::RefPtr<Gtk::Action>);
|
||||
|
||||
void disable_scrolling();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user