allow sending OSC from inline display UIs
[ardour.git] / gtk2_ardour / route_ui.cc
index 4427810bdeefaeca8b8e0bff4c90bd82d45abbab..3f2f39d0cdc59d5e3aadc7f1a9e149e665eb2d13 100644 (file)
@@ -71,7 +71,7 @@
 #include "utils.h"
 
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 using namespace Gtk;
 using namespace Gtkmm2ext;
 using namespace ARDOUR;
@@ -85,7 +85,9 @@ boost::weak_ptr<Route> RouteUI::_showing_sends_to;
 std::string RouteUI::program_port_prefix;
 
 RouteUI::RouteUI (ARDOUR::Session* sess)
-       : mute_menu(0)
+       : monitor_input_button (0)
+       , monitor_disk_button (0)
+       , mute_menu(0)
        , solo_menu(0)
        , sends_menu(0)
        , record_menu(0)
@@ -123,6 +125,8 @@ RouteUI::~RouteUI()
        delete comment_window;
        delete input_selector;
        delete output_selector;
+       delete monitor_input_button;
+       delete monitor_disk_button;
        delete _invert_menu;
 
        send_blink_connection.disconnect ();
@@ -182,13 +186,13 @@ RouteUI::init ()
        show_sends_button->set_name ("send alert button");
        UI::instance()->set_tip (show_sends_button, _("make mixer strips show sends to this bus"), "");
 
-       monitor_input_button = manage (new ArdourButton (ArdourButton::default_elements));
+       monitor_input_button = new ArdourButton (ArdourButton::default_elements);
        monitor_input_button->set_name ("monitor button");
        monitor_input_button->set_text (_("In"));
        UI::instance()->set_tip (monitor_input_button, _("Monitor input"), "");
        monitor_input_button->set_no_show_all (true);
 
-       monitor_disk_button = manage (new ArdourButton (ArdourButton::default_elements));
+       monitor_disk_button = new ArdourButton (ArdourButton::default_elements);
        monitor_disk_button->set_name ("monitor button");
        monitor_disk_button->set_text (_("Disk"));
        UI::instance()->set_tip (monitor_disk_button, _("Monitor playback"), "");
@@ -1289,15 +1293,13 @@ RouteUI::update_mute_display ()
 void
 RouteUI::route_rec_enable_changed ()
 {
-       blink_rec_display(true);  //this lets the button change "immediately" rather than wait for the next blink
-       update_monitoring_display ();
+       blink_rec_display (true);  //this lets the button change "immediately" rather than wait for the next blink
 }
 
 void
 RouteUI::session_rec_enable_changed ()
 {
-       blink_rec_display(true);  //this lets the button change "immediately" rather than wait for the next blink
-       update_monitoring_display ();
+       blink_rec_display (true);  //this lets the button change "immediately" rather than wait for the next blink
 }
 
 void
@@ -2146,33 +2148,6 @@ RouteUI::route_gui_changed (PropertyChange const& what_changed)
                        route_color_changed ();
                }
        }
-
-       if (what_changed.contains (Properties::selected)) {
-               show_selected ();
-       }
-}
-
-void
-RouteUI::set_selected (bool yn)
-{
-       Selectable::set_selected (yn);
-       if (_route) {
-               _route->presentation_info().set_selected (yn);
-       }
-}
-
-bool
-RouteUI::selected () const
-{
-       /* XXX not sure if this is a wise design. Probably don't really want
-        * the cached _selected value from Selectable.
-        */
-
-       if (!_route) {
-               return _selected;
-       }
-
-       return _route->presentation_info().selected();
 }
 
 void
@@ -2367,3 +2342,10 @@ RouteUI::mark_hidden (bool yn)
        }
        return false;
 }
+
+boost::shared_ptr<Stripable>
+RouteUI::stripable () const
+{
+       return _route;
+}
+