mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-24 06:07:29 +01:00
mackie: add "clean" method to invoke GUI actions from button events, in code
This commit is contained in:
parent
ef793d3762
commit
2b56dc17e3
2 changed files with 18 additions and 0 deletions
|
|
@ -915,3 +915,16 @@ MackieControlProtocolGUI::active_port_changed (Gtk::ComboBox* combo, boost::weak
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* special case: MackieControlProtocol object method that requires GUI headers */
|
||||
|
||||
void
|
||||
MackieControlProtocol::gui_invoke (string const& action_name)
|
||||
{
|
||||
Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (action_name.c_str());
|
||||
if (act) {
|
||||
act->activate ();
|
||||
} else {
|
||||
std::cerr << "no such action: " << action_name << std::endl;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,6 +388,11 @@ class MackieControlProtocol
|
|||
int set_device_info (const std::string& device_name);
|
||||
void update_configuration_state ();
|
||||
|
||||
/* accepts an Action name from the application GUI definitions, and
|
||||
invokes it
|
||||
*/
|
||||
void gui_invoke (std::string const &);
|
||||
|
||||
/* MIDI port connection management */
|
||||
|
||||
PBD::ScopedConnection port_connection;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue