X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Fosc%2Fosc_gui.cc;h=e45b60a731a932caca20f699145afcec48f6cadd;hb=d4ae858bf6ca9340444b802b53596ef2b8a2298c;hp=a78b9d2c5f64df1128c881b892059c6ce63ea0c1;hpb=f3e0fcbb7e33fdaa54aaead2985b4ca7eed6fa57;p=ardour.git diff --git a/libs/surfaces/osc/osc_gui.cc b/libs/surfaces/osc/osc_gui.cc index a78b9d2c5f..e45b60a731 100644 --- a/libs/surfaces/osc/osc_gui.cc +++ b/libs/surfaces/osc/osc_gui.cc @@ -138,6 +138,8 @@ OSC_GUI::OSC_GUI (OSC& p) table->attach (gainmode_combo, 1, 2, n, n+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0); std::vector gainmode_options; gainmode_options.push_back (_("/strip/gain (dB)")); + gainmode_options.push_back (_("/strip/fader (Position) and dB in control name")); + gainmode_options.push_back (_("/strip/fader (Position) and /strip/gain (dB)")); gainmode_options.push_back (_("/strip/fader (Position)")); set_popdown_strings (gainmode_combo, gainmode_options); @@ -154,6 +156,7 @@ OSC_GUI::OSC_GUI (OSC& p) debug_options.push_back (_("Off")); debug_options.push_back (_("Log invalid messages")); debug_options.push_back (_("Log all messages")); + debug_options.push_back (_("Print surface information to Log window")); set_popdown_strings (debug_combo, debug_options); debug_combo.set_active ((int)cp.get_debug_mode()); @@ -272,6 +275,12 @@ OSC_GUI::OSC_GUI (OSC& p) sttable->attach (hidden_tracks, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0); ++stn; + label = manage (new Gtk::Label(_("Use Groups:"))); + label->set_alignment(1, .5); + sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0)); + sttable->attach (usegroups, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0); + ++stn; + sttable->show_all (); append_page (*sttable, _("Default Strip Types")); @@ -402,6 +411,7 @@ OSC_GUI::OSC_GUI (OSC& p) monitor_type.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets)); selected_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets)); hidden_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets)); + usegroups.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets)); strip_buttons_button.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets)); strip_control_button.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets)); ssid_as_path.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets)); @@ -488,6 +498,10 @@ OSC_GUI::debug_changed () else if (str == _("Log all messages")) { cp.set_debug_mode (OSC::All); } + else if (str == _("Print surface information to Log window")) { + cp.get_surfaces (); + debug_combo.set_active ((int)cp.get_debug_mode()); + } else { std::cerr << "Invalid OSC Debug Mode\n"; assert (0); @@ -571,9 +585,15 @@ OSC_GUI::gainmode_changed () if (str == _("/strip/gain (dB)")) { cp.set_gainmode (0); } - else if (str == _("/strip/fader (Position)")) { + else if (str == _("/strip/fader (Position) and dB in control name")) { cp.set_gainmode (1); } + else if (str == _("/strip/fader (Position) and /strip/gain (dB)")) { + cp.set_gainmode (2); + } + else if (str == _("/strip/fader (Position)")) { + cp.set_gainmode (3); + } else { std::cerr << "Invalid OSC Gain Mode\n"; assert (0); @@ -644,6 +664,7 @@ OSC_GUI::reshow_values () audio_auxes.set_active(def_strip & 128); selected_tracks.set_active(def_strip & 256); hidden_tracks.set_active(def_strip & 512); + usegroups.set_active(def_strip & 1024); def_feedback = cp.get_defaultfeedback(); strip_buttons_button.set_active(def_feedback & 1); strip_control_button.set_active(def_feedback & 2); @@ -752,6 +773,9 @@ OSC_GUI::calculate_strip_types () if (hidden_tracks.get_active()) { stvalue += 512; } + if (usegroups.get_active()) { + stvalue += 1024; + } current_strip_types.set_text(string_compose("%1", stvalue)); } @@ -969,6 +993,7 @@ OSC_GUI::load_preset (std::string preset) gainmode_combo.set_active (atoi (prop->value().c_str())); } cp.gui_changed(); + clear_device (); } }