summaryrefslogtreecommitdiff
path: root/gtk2_ardour/ardour_ui_ed.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/ardour_ui_ed.cc')
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 2acf1b28c6..33307e61ec 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -479,7 +479,7 @@ ARDOUR_UI::toggle_control_protocol (ControlProtocolInfo* cpi)
}
void
-ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const char* group, const char* action)
+ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const char* group, string action)
{
if (!session) {
/* this happens when we build the menu bar when control protocol support
@@ -490,14 +490,17 @@ ARDOUR_UI::toggle_control_protocol_feedback (ControlProtocolInfo* cpi, const cha
}
if (cpi->protocol) {
- Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action);
+ Glib::RefPtr<Gtk::Action> act = ActionManager::get_action (group, action.c_str());
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
- bool x = tact->get_active();
- if (tact && x != cpi->protocol->get_feedback()) {
- cpi->protocol->set_feedback (!x);
+ if (tact) {
+ bool x = tact->get_active();
+
+ if (x != cpi->protocol->get_feedback()) {
+ cpi->protocol->set_feedback (x);
+ }
}
}
}
@@ -552,7 +555,7 @@ ARDOUR_UI::build_control_surface_menu ()
(bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol_feedback),
*i,
"Editor",
- action_name.c_str())));
+ action_name)));
ui += "<menu action='";
ui += submenu_name;