diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-12 09:01:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-12 09:01:52 +0000 |
commit | b0424889b32e136ca25186037b032b229824ac79 (patch) | |
tree | ea91d64e0e80954384a6a330b9d8b91981949a81 | |
parent | 823f44e50a35d75eb7765e74bbbe8908af9a5c1d (diff) |
make tracks visible again
git-svn-id: svn://localhost/ardour2/branches/3.0@3719 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/audio_time_axis.cc | 18 | ||||
-rw-r--r-- | gtk2_ardour/automation_time_axis.cc | 9 | ||||
-rw-r--r-- | gtk2_ardour/automation_time_axis.h | 3 | ||||
-rw-r--r-- | gtk2_ardour/axis_view.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/editor.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/editor_route_list.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/mixer_strip.cc | 4 | ||||
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 11 | ||||
-rw-r--r-- | gtk2_ardour/time_axis_view.cc | 1 | ||||
-rw-r--r-- | gtk2_ardour/visual_time_axis.cc | 1 | ||||
-rw-r--r-- | libs/ardour/automatable.cc | 3 |
11 files changed, 43 insertions, 23 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc index 8eea568b7b..124c639367 100644 --- a/gtk2_ardour/audio_time_axis.cc +++ b/gtk2_ardour/audio_time_axis.cc @@ -92,15 +92,11 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh mute_button->set_active (false); solo_button->set_active (false); - if (is_audio_track()) - controls_ebox.set_name ("AudioTimeAxisViewControlsBaseUnselected"); - else // bus + if (is_audio_track()) { + controls_ebox.set_name ("AudioTrackControlsBaseUnselected"); + } else { // bus controls_ebox.set_name ("AudioBusControlsBaseUnselected"); - - /* map current state of the route */ - - processors_changed (); - reset_processor_automation_curves (); + } ensure_xml_node (); @@ -108,6 +104,11 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh _route->panner().Changed.connect (bind (mem_fun(*this, &AudioTimeAxisView::update_pans), false)); + /* map current state of the route */ + + processors_changed (); + reset_processor_automation_curves (); + update_pans (false); update_control_names (); if (is_audio_track()) { @@ -161,6 +162,7 @@ AudioTimeAxisView::hide () TimeAxisView::hide (); } + void AudioTimeAxisView::append_extra_display_menu_items () { diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc index 36d615453c..47d0ebe61e 100644 --- a/gtk2_ardour/automation_time_axis.cc +++ b/gtk2_ardour/automation_time_axis.cc @@ -376,12 +376,10 @@ void AutomationTimeAxisView::set_height (uint32_t h) { bool changed = (height != (uint32_t) h) || first_call_to_set_height; - - if (first_call_to_set_height) - first_call_to_set_height = false; bool changed_between_small_and_normal = ( (h == hSmall || h == hSmaller) ^ (height == hSmall || height == hSmaller) ); TimeAxisView* state_parent = get_parent_with_state (); + assert(state_parent); XMLNode* xml_node = state_parent->get_automation_child_xml_node (_control->parameter()); @@ -401,6 +399,7 @@ AutomationTimeAxisView::set_height (uint32_t h) xml_node->add_property ("height", buf); if (changed_between_small_and_normal || first_call_to_set_height) { + first_call_to_set_height = false; if (h >= hNormal) { @@ -912,9 +911,9 @@ void AutomationTimeAxisView::update_extra_xml_shown (bool editor_shown) { XMLNode* xml_node = get_state_node(); -// if (xml_node) { + if (xml_node) { xml_node->add_property ("shown", editor_shown ? "yes" : "no"); -// } + } } guint32 diff --git a/gtk2_ardour/automation_time_axis.h b/gtk2_ardour/automation_time_axis.h index fb56c400c7..8899dc4949 100644 --- a/gtk2_ardour/automation_time_axis.h +++ b/gtk2_ardour/automation_time_axis.h @@ -71,8 +71,7 @@ class AutomationTimeAxisView : public TimeAxisView { ~AutomationTimeAxisView(); - - void set_height (uint32_t); + virtual void set_height (uint32_t); void set_samples_per_unit (double); std::string name() const { return _name; } diff --git a/gtk2_ardour/axis_view.cc b/gtk2_ardour/axis_view.cc index 0c57eebfca..f22b0d2dc7 100644 --- a/gtk2_ardour/axis_view.cc +++ b/gtk2_ardour/axis_view.cc @@ -47,7 +47,7 @@ list<Gdk::Color> AxisView::used_colors; AxisView::AxisView (ARDOUR::Session& sess) : _session(sess) { _selected = false; - _marked_for_display = true; + _marked_for_display = false; } AxisView::~AxisView() diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index 5fe9e000d0..f8209b8a56 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -744,6 +744,10 @@ Editor::Editor () vpacker.pack_end (status_bar_hpacker, false, false); vpacker.pack_end (global_hpacker, true, true); + edit_controls_vbox.show (); + controls_layout.show (); + the_notebook.show_all (); + /* register actions now so that set_state() can find them and set toggles/checks etc */ register_actions (); diff --git a/gtk2_ardour/editor_route_list.cc b/gtk2_ardour/editor_route_list.cc index 6213bf9d1e..db93f9ffeb 100644 --- a/gtk2_ardour/editor_route_list.cc +++ b/gtk2_ardour/editor_route_list.cc @@ -102,12 +102,14 @@ Editor::handle_new_route (Session::RouteList& routes) #else row = *(route_display_model->append ()); #endif + + cerr << route->name() << " marked for display ? " << tv->marked_for_display() << endl; row[route_display_columns.text] = route->name(); row[route_display_columns.visible] = tv->marked_for_display(); row[route_display_columns.tv] = tv; row[route_display_columns.route] = route; - + track_views.push_back (tv); ignore_route_list_reorder = true; @@ -233,6 +235,7 @@ Editor::update_route_visibility () for (i = rows.begin(); i != rows.end(); ++i) { TimeAxisView *tv = (*i)[route_display_columns.tv]; (*i)[route_display_columns.visible] = tv->marked_for_display (); + cerr << "marked " << tv->name() << " for display = " << tv->marked_for_display() << endl; } no_route_list_redisplay = false; @@ -319,6 +322,8 @@ Editor::redisplay_route_list () uint32_t position; uint32_t order; int n; + + cerr << "RRL, nrld = " << no_route_list_redisplay << " with " << rows.size() << endl; if (no_route_list_redisplay) { return; @@ -347,9 +352,12 @@ Editor::redisplay_route_list () bool visible = (*i)[route_display_columns.visible]; + cerr << "\tvisible = " << visible << endl; + if (visible) { tv->set_marked_for_display (true); position += tv->show_at (position, n, &edit_controls_vbox); + cerr << "packed tv for " << tv->name() << " @ " << position << endl; } else { tv->hide (); } diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index c98f4c5a0f..1a8949d1b8 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -107,7 +107,9 @@ MixerStrip::MixerStrip (Mixer_UI& mx, Session& sess, boost::shared_ptr<Route> rt input_selector = 0; output_selector = 0; group_menu = 0; - _marked_for_display = false; + if (!_route->is_hidden()) { + _marked_for_display = true; + } route_ops_menu = 0; ignore_comment_edit = false; ignore_toggle = false; diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 82777944f4..f5e1a82a10 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -117,6 +117,11 @@ RouteTimeAxisView::RouteTimeAxisView (PublicEditor& ed, Session& sess, boost::sh playlist_action_menu = 0; automation_action_menu = 0; _view = 0; + + if (!_route->is_hidden()) { + _marked_for_display = true; + } + timestretch_rect = 0; no_redraw = false; destructive_track_mode_item = 0; @@ -1795,6 +1800,7 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom using namespace Menu_Helpers; XMLProperty* prop; + XMLNode* node; add_child (track); @@ -1802,8 +1808,6 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom bool hideit = (!show); - XMLNode* node; - if ((node = track->get_state_node()) != 0) { if ((prop = node->property ("shown")) != 0) { if (prop->value() == "yes") { @@ -1811,6 +1815,8 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom } } } + + cerr << "with show = " << show << " Adding automation child for " << _route->name() << " hideit = " << hideit << " prop = " << prop << endl; _automation_tracks.insert(std::make_pair(param, new RouteAutomationNode(param, NULL, track))); @@ -1819,6 +1825,7 @@ RouteTimeAxisView::add_automation_child(Parameter param, boost::shared_ptr<Autom } else { _show_automation.insert (param); + if (!no_redraw) { _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */ } diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc index 7858b536f8..34f8de06dc 100644 --- a/gtk2_ardour/time_axis_view.cc +++ b/gtk2_ardour/time_axis_view.cc @@ -95,7 +95,6 @@ TimeAxisView::TimeAxisView (ARDOUR::Session& sess, PublicEditor& ed, TimeAxisVie control_parent = 0; display_menu = 0; size_menu = 0; - _marked_for_display = false; _hidden = false; in_destructor = false; height = 0; diff --git a/gtk2_ardour/visual_time_axis.cc b/gtk2_ardour/visual_time_axis.cc index 8a707183cd..999f4c81f5 100644 --- a/gtk2_ardour/visual_time_axis.cc +++ b/gtk2_ardour/visual_time_axis.cc @@ -74,7 +74,6 @@ VisualTimeAxis::VisualTimeAxis(const string & name, PublicEditor& ed, ARDOUR::Se { time_axis_name = name ; _color = unique_random_color() ; - _marked_for_display = true; name_entry.signal_activate().connect(mem_fun(*this, &VisualTimeAxis::name_entry_changed)) ; name_entry.signal_button_press_event().connect(mem_fun(*this, &VisualTimeAxis::name_entry_button_press_handler)) ; diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 3c076c371a..cacebe59a4 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -201,7 +201,8 @@ Automatable::describe_parameter (Parameter param) if (param == Parameter(GainAutomation)) { return _("Fader"); } else if (param.type() == PanAutomation) { - return (string_compose(_("Pan %1"), param.id())); + /* ID's are zero-based, present them as 1-based */ + return (string_compose(_("Pan %1"), param.id() + 1)); } else if (param.type() == MidiCCAutomation) { return string_compose("CC %1 (%2) [%3]", param.id(), midi_name(param.id()), int(param.channel()) + 1); |