diff options
author | David Robillard <d@drobilla.net> | 2007-06-04 00:05:33 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-06-04 00:05:33 +0000 |
commit | 70fd14afe809c7ac7d3b5b382c77580d7b8f6085 (patch) | |
tree | b996da4ea8757e58bbef4db13ca70f508a7464c2 /gtk2_ardour | |
parent | 5ee467790081b90b929bbeafda6b6d1f593929b5 (diff) |
Show selected MIDI track in editor mixer.
Minor code cleanups.
git-svn-id: svn://localhost/ardour2/trunk@1949 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/editor_mixer.cc | 8 | ||||
-rw-r--r-- | gtk2_ardour/editor_mouse.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/gain_meter.cc | 6 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 17 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.h | 2 | ||||
-rw-r--r-- | gtk2_ardour/redirect_box.cc | 4 |
7 files changed, 26 insertions, 23 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index eacd19a328..e47362be88 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -724,7 +724,7 @@ ARDOUR_UI::count_recenabled_streams (Route& route) { Track* track = dynamic_cast<Track*>(&route); if (track && track->diskstream()->record_enabled()) { - rec_enabled_streams += track->n_inputs().get_total(); + rec_enabled_streams += track->n_inputs().n_total(); } } @@ -1620,7 +1620,7 @@ ARDOUR_UI::name_io_setup (AudioEngine& engine, bool in) { if (in) { - if (io.n_inputs().get_total() == 0) { + if (io.n_inputs().n_total() == 0) { buf = _("none"); return; } @@ -1639,7 +1639,7 @@ ARDOUR_UI::name_io_setup (AudioEngine& engine, } else { - if (io.n_outputs().get_total() == 0) { + if (io.n_outputs().n_total() == 0) { buf = _("none"); return; } diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc index 5804381102..9bb481966e 100644 --- a/gtk2_ardour/editor_mixer.cc +++ b/gtk2_ardour/editor_mixer.cc @@ -133,10 +133,10 @@ Editor::show_editor_mixer (bool yn) void Editor::set_selected_mixer_strip (TimeAxisView& view) { - AudioTimeAxisView* at; + RouteTimeAxisView* rt; bool show = false; - if (!session || (at = dynamic_cast<AudioTimeAxisView*>(&view)) == 0) { + if (!session || (rt = dynamic_cast<RouteTimeAxisView*>(&view)) == 0) { return; } @@ -144,7 +144,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view) /* might be nothing to do */ - if (current_mixer_strip->route() == at->route()) { + if (current_mixer_strip->route() == rt->route()) { return; } @@ -157,7 +157,7 @@ Editor::set_selected_mixer_strip (TimeAxisView& view) current_mixer_strip = new MixerStrip (*ARDOUR_UI::instance()->the_mixer(), *session, - at->route()); + rt->route()); current_mixer_strip->GoingAway.connect (mem_fun(*this, &Editor::cms_deleted)); if (show) { diff --git a/gtk2_ardour/editor_mouse.cc b/gtk2_ardour/editor_mouse.cc index e8a50686b3..22bb6e8a08 100644 --- a/gtk2_ardour/editor_mouse.cc +++ b/gtk2_ardour/editor_mouse.cc @@ -3404,12 +3404,12 @@ Editor::region_drag_finished_callback (ArdourCanvas::Item* item, GdkEvent* event boost::shared_ptr<Region> newregion; boost::shared_ptr<Region> ar; + boost::shared_ptr<Region> mr; if ((ar = boost::dynamic_pointer_cast<AudioRegion>(rv->region())) != 0) { newregion = RegionFactory::create (ar); - } else { - /* XXX MIDI HERE drobilla */ - continue; + } else if ((mr = boost::dynamic_pointer_cast<MidiRegion>(rv->region())) != 0) { + newregion = RegionFactory::create (mr); } /* add it */ diff --git a/gtk2_ardour/gain_meter.cc b/gtk2_ardour/gain_meter.cc index 358db28edf..8c765a28ad 100644 --- a/gtk2_ardour/gain_meter.cc +++ b/gtk2_ardour/gain_meter.cc @@ -411,7 +411,7 @@ GainMeter::hide_all_meters () void GainMeter::setup_meters () { - uint32_t nmeters = _io->n_outputs().n_audio(); + uint32_t nmeters = _io->n_outputs().n_total(); guint16 width; hide_all_meters (); @@ -432,7 +432,7 @@ GainMeter::setup_meters () } else { - nmeters = _io->n_outputs().n_audio(); + nmeters = _io->n_outputs().n_total(); } @@ -453,7 +453,7 @@ GainMeter::setup_meters () /* pack them backwards */ if (_width == Wide) { - meter_packer.pack_end (meter_metric_area, false, false); + meter_packer.pack_end (meter_metric_area, false, false); meter_metric_area.show_all (); } diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 1e007cac4c..2a3b045b27 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -622,7 +622,7 @@ MixerStrip::add_bundle_to_input_menu (ARDOUR::Bundle* c) MenuList& citems = input_menu.items(); - if (c->nchannels() == _route->n_inputs().get_total()) { + if (c->nchannels() == _route->n_inputs().n_total()) { citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::bundle_input_chosen), c))); @@ -645,7 +645,7 @@ MixerStrip::add_bundle_to_output_menu (ARDOUR::Bundle* c) return; } - if (c->nchannels() == _route->n_outputs().get_total()) { + if (c->nchannels() == _route->n_outputs().n_total()) { MenuList& citems = output_menu.items(); citems.push_back (CheckMenuElem (c->name(), bind (mem_fun(*this, &MixerStrip::bundle_output_chosen), c))); @@ -1171,6 +1171,7 @@ MixerStrip::route_active_changed () set_name ("MidiTrackStripBaseInactive"); gpm.set_meter_strip_name ("MidiTrackStripBaseInactive"); } + gpm.set_fader_name ("MidiTrackFader"); } else if (is_audio_track()) { if (_route->active()) { set_name ("AudioTrackStripBase"); @@ -1189,6 +1190,8 @@ MixerStrip::route_active_changed () gpm.set_meter_strip_name ("AudioBusStripBaseInactive"); } gpm.set_fader_name ("AudioBusFader"); + + /* (no MIDI busses yet) */ } } @@ -1214,20 +1217,20 @@ MixerStrip::meter_changed (void *src) ENSURE_GUI_THREAD (bind (mem_fun(*this, &MixerStrip::meter_changed), src)); - switch (_route->meter_point()) { + switch (_route->meter_point()) { case MeterInput: meter_point_label.set_text (_("input")); break; - + case MeterPreFader: meter_point_label.set_text (_("pre")); break; - + case MeterPostFader: meter_point_label.set_text (_("post")); break; - } + } - gpm.setup_meters (); + gpm.setup_meters (); } diff --git a/gtk2_ardour/mixer_strip.h b/gtk2_ardour/mixer_strip.h index 02a78575ad..eb57037808 100644 --- a/gtk2_ardour/mixer_strip.h +++ b/gtk2_ardour/mixer_strip.h @@ -124,7 +124,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox RedirectBox pre_redirect_box; RedirectBox post_redirect_box; GainMeter gpm; - PannerUI panners; + PannerUI panners; Gtk::Table button_table; Gtk::Table middle_button_table; diff --git a/gtk2_ardour/redirect_box.cc b/gtk2_ardour/redirect_box.cc index 99d7b9735d..9533cbf782 100644 --- a/gtk2_ardour/redirect_box.cc +++ b/gtk2_ardour/redirect_box.cc @@ -452,8 +452,8 @@ RedirectBox::weird_plugin_dialog (Plugin& p, uint32_t streams, boost::shared_ptr p.name(), p.get_info()->n_inputs, p.get_info()->n_outputs, - io->n_inputs().get_total(), - io->n_outputs().get_total(), + io->n_inputs().n_total(), + io->n_outputs().n_total(), streams)); } |