X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_strip.cc;h=bbef4ffbf61db9b92694e85f69f8a3e412c23cbf;hb=dab0dacc66dcc190b4408ba75e3807973582cbd6;hp=6f3d10d94b8ba5d47e8face69e6876be6da23369;hpb=a8e354ed7bb38f8be8bfdda33841f3f238e8bbab;p=ardour.git diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 6f3d10d94b..bbef4ffbf6 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -54,6 +53,7 @@ #include "mixer_strip.h" #include "mixer_ui.h" #include "keyboard.h" +#include "led.h" #include "public_editor.h" #include "send_ui.h" #include "io_selector.h" @@ -84,6 +84,7 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session* sess, bool in_mixer) , panners (sess) , _mono_button (_("Mono")) , button_table (4, 2) + , solo_led_table (2, 2) , middle_button_table (1, 2) , bottom_button_table (1, 2) , meter_point_label (_("pre")) @@ -184,6 +185,44 @@ MixerStrip::init () solo_button->set_name ("MixerSoloButton"); invert_button->set_name ("MixerInvertButton"); + solo_isolated_led = manage (new LED); + solo_isolated_led->show (); + solo_isolated_led->set_diameter (6); + solo_isolated_led->set_no_show_all (true); + solo_isolated_led->set_name (X_("SoloIsolatedLED")); + solo_isolated_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); + solo_isolated_led->signal_button_release_event().connect (sigc::mem_fun (*this, &RouteUI::solo_isolate_button_release)); + UI::instance()->set_tip (solo_isolated_led, _("Isolate Solo"), ""); + + solo_safe_led = manage (new LED); + solo_safe_led->show (); + solo_safe_led->set_diameter (6); + solo_safe_led->set_no_show_all (true); + solo_safe_led->set_name (X_("SoloSafeLED")); + solo_safe_led->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK); + solo_safe_led->signal_button_release_event().connect (sigc::mem_fun (*this, &RouteUI::solo_safe_button_release)); + UI::instance()->set_tip (solo_safe_led, _("Lock Solo Status"), ""); + + Label* iso_label = manage (new Label (_("iso"))); + Label* safe_label = manage (new Label (_("lock"))); + + iso_label->set_name (X_("SoloLEDLabel")); + safe_label->set_name (X_("SoloLEDLabel")); + + iso_label->show (); + safe_label->show (); + + solo_led_table.set_spacings (0); + solo_led_table.set_border_width (1); + solo_led_table.attach (*iso_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL); + solo_led_table.attach (*solo_isolated_led, 1, 2, 0, 1, Gtk::FILL, Gtk::FILL); + solo_led_table.attach (*safe_label, 0, 1, 1, 2, Gtk::FILL, Gtk::FILL); + solo_led_table.attach (*solo_safe_led, 1, 2, 1, 2, Gtk::FILL, Gtk::FILL); + + solo_led_table.show (); + solo_led_box.pack_end (solo_led_table, false, false); + solo_led_box.show (); + button_table.set_homogeneous (true); button_table.set_spacings (0); @@ -236,6 +275,7 @@ MixerStrip::init () global_vpacker.pack_start (whvbox, Gtk::PACK_SHRINK); global_vpacker.pack_start (button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (processor_box, true, true); + global_vpacker.pack_start (solo_led_box,Gtk::PACK_SHRINK); global_vpacker.pack_start (middle_button_table,Gtk::PACK_SHRINK); global_vpacker.pack_start (gain_meter_alignment,Gtk::PACK_SHRINK); global_vpacker.pack_start (bottom_button_table,Gtk::PACK_SHRINK); @@ -346,8 +386,10 @@ MixerStrip::set_route (boost::shared_ptr rt) if (route()->is_master()) { solo_button->hide (); + solo_led_box.hide (); } else { solo_button->show (); + solo_led_box.show (); } if (_mixer_owned && (route()->is_master() || route()->is_monitor())) { @@ -1379,8 +1421,8 @@ MixerStrip::build_route_ops_menu () MenuList& items = route_ops_menu->items(); - items.push_back (MenuElem (_("Save As Template"), sigc::mem_fun(*this, &RouteUI::save_as_template))); - items.push_back (MenuElem (_("Rename"), sigc::mem_fun(*this, &RouteUI::route_rename))); + items.push_back (MenuElem (_("Save As Template..."), sigc::mem_fun(*this, &RouteUI::save_as_template))); + items.push_back (MenuElem (_("Rename..."), sigc::mem_fun(*this, &RouteUI::route_rename))); rename_menu_item = &items.back(); items.push_back (SeparatorElem()); items.push_back (CheckMenuElem (_("Active"), sigc::mem_fun (*this, &RouteUI::toggle_route_active))); @@ -1389,10 +1431,10 @@ MixerStrip::build_route_ops_menu () items.push_back (SeparatorElem()); - items.push_back (MenuElem (_("Adjust latency"), sigc::mem_fun (*this, &RouteUI::adjust_latency))); + items.push_back (MenuElem (_("Adjust Latency..."), sigc::mem_fun (*this, &RouteUI::adjust_latency))); items.push_back (SeparatorElem()); - items.push_back (CheckMenuElem (_("Protect against denormals"), sigc::mem_fun (*this, &RouteUI::toggle_denormal_protection))); + items.push_back (CheckMenuElem (_("Protect Against Denormals"), sigc::mem_fun (*this, &RouteUI::toggle_denormal_protection))); denormal_menu_item = dynamic_cast (&items.back()); denormal_menu_item->set_active (_route->denormal_protection());