diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-20 21:26:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-20 21:26:20 +0000 |
commit | 326cd24c12d8b11402ef0c10507ecbdea8f86d7f (patch) | |
tree | 315d307f6f14439651b75be5206437970ad50c0f /gtk2_ardour/option_editor.cc | |
parent | 780e9d7ecb224a4f95de06d4af2d3795565bcec0 (diff) |
make MMC work again, make tracing MIDI input work again, add GUI control for MMC device ID ++
git-svn-id: svn://localhost/ardour2/trunk@1480 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/option_editor.cc')
-rw-r--r-- | gtk2_ardour/option_editor.cc | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc index 13acfbf5ab..79fe5dd2e3 100644 --- a/gtk2_ardour/option_editor.cc +++ b/gtk2_ardour/option_editor.cc @@ -75,6 +75,9 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui) /* MIDI */ + mmc_device_id_adjustment (0.0, 0.0, (double) 0x7f, 1.0, 16.0), + mmc_device_id_spinner (mmc_device_id_adjustment), + /* Click */ click_table (2, 3), @@ -368,23 +371,28 @@ OptionEditor::setup_midi_options () ToggleButton* tb; RadioButton* rb; - Gtk::Table* table = manage (new Table (ports.size() + 4, 9)); + Gtk::Table* table = manage (new Table (ports.size() + 4, 10)); table->set_row_spacings (6); table->set_col_spacings (10); - table->attach (*(manage (new Label (X_("Port")))), 0, 1, 0, 1); - table->attach (*(manage (new Label (X_("Offline")))), 1, 2, 0, 1); - table->attach (*(manage (new Label (X_("Trace\nInput")))), 2, 3, 0, 1); - table->attach (*(manage (new Label (X_("Trace\nOutput")))), 3, 4, 0, 1); - table->attach (*(manage (new Label (X_("MTC")))), 4, 5, 0, 1); - table->attach (*(manage (new Label (X_("MMC")))), 6, 7, 0, 1); - table->attach (*(manage (new Label (X_("MIDI Parameter\nControl")))), 8, 9, 0, 1); + table->attach (*(manage (new Label (_("Port")))), 0, 1, 0, 1); + table->attach (*(manage (new Label (_("Offline")))), 1, 2, 0, 1); + table->attach (*(manage (new Label (_("Trace\nInput")))), 2, 3, 0, 1); + table->attach (*(manage (new Label (_("Trace\nOutput")))), 3, 4, 0, 1); + table->attach (*(manage (new Label (_("MTC")))), 4, 5, 0, 1); + table->attach (*(manage (new Label (_("MMC")))), 6, 7, 0, 1); + table->attach (*(manage (new Label (_("MIDI Parameter\nControl")))), 8, 9, 0, 1); table->attach (*(manage (new HSeparator())), 0, 9, 1, 2); table->attach (*(manage (new VSeparator())), 5, 6, 0, 8); table->attach (*(manage (new VSeparator())), 7, 8, 0, 8); + table->attach (*(manage (new Label (_("MMC Device ID")))), 9, 10, 0, 1); + table->attach (mmc_device_id_spinner, 9, 10, 1, 2); + + mmc_device_id_adjustment.signal_value_changed().connect (mem_fun (*this, &OptionEditor::mmc_device_id_adjusted)); + for (n = 0, i = ports.begin(); i != ports.end(); ++n, ++i) { pair<MIDI::Port*,vector<RadioButton*> > newpair; @@ -554,12 +562,22 @@ OptionEditor::map_port_online (MIDI::Port* port, ToggleButton* tb) } void +OptionEditor::mmc_device_id_adjusted () +{ + uint8_t id = (uint8_t) mmc_device_id_spinner.get_value(); + + if (id != Config->get_mmc_device_id()) { + Config->set_mmc_device_id (id); + } +} + +void OptionEditor::port_trace_in_toggled (MIDI::Port* port, ToggleButton* tb) { bool trace = tb->get_active(); if (port->input()->tracing() != trace) { - port->output()->trace (trace, &cerr, string (port->name()) + string (" input: ")); + port->input()->trace (trace, &cerr, string (port->name()) + string (" input: ")); } } |