mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
a better way to build ArdourDropdowns from Actions
This commit is contained in:
parent
bdf9dec411
commit
02abf956d7
2 changed files with 7 additions and 0 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue