From 4499066f39f735bfe530a8b0d40c211023020b91 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 11 Nov 2016 03:54:50 +0100 Subject: static MonitorSection Action -- fixes #7098 ActionManager registered actions are static global and cannot reference an instance (this) directly. --- gtk2_ardour/monitor_section.h | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'gtk2_ardour/monitor_section.h') diff --git a/gtk2_ardour/monitor_section.h b/gtk2_ardour/monitor_section.h index 8a3c23a6c6..87ea60fad2 100644 --- a/gtk2_ardour/monitor_section.h +++ b/gtk2_ardour/monitor_section.h @@ -106,9 +106,30 @@ class MonitorSection : public RouteUI, public Gtk::EventBox boost::shared_ptr _monitor; boost::shared_ptr _route; + enum MonitorActions { + MonitorMono, + MonitorCutAll, + MonitorDimAll, + ToggleExclusiveSolo, + ToggleMuteOverridesSolo, + SoloUseInPlace, + SoloUseAFL, + SoloUsePFL, + ToggleMonitorProcessorBox + }; + + enum ChannelActions { + CutChannel, + DimChannel, + SoloChannel, + InvertChannel + }; + static Glib::RefPtr monitor_actions; - void register_actions (); - void connect_actions (); + static void register_actions (); + + static void action_proxy0 (enum MonitorActions); + static void action_proxy1 (enum ChannelActions, uint32_t); void cut_channel (uint32_t); void dim_channel (uint32_t); @@ -179,11 +200,10 @@ class MonitorSection : public RouteUI, public Gtk::EventBox Glib::RefPtr proctoggle; bool _ui_initialized; - private: - Gtkmm2ext::ActionMap myactions; - Gtkmm2ext::Bindings* bindings; + static Gtkmm2ext::ActionMap myactions; + static Gtkmm2ext::Bindings* bindings; - void load_bindings (); + static void load_bindings (); bool enter_handler (GdkEventCrossing*); bool leave_handler (GdkEventCrossing*); }; -- cgit v1.2.3