summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-06-30 22:08:39 +0000
committerDavid Robillard <d@drobilla.net>2007-06-30 22:08:39 +0000
commitef0b9a740996c432a6a96180814d4f8d0ee16842 (patch)
treee872bbbeb9f0358e4fd8a1445088f825338840ad /gtk2_ardour
parentbbf41757133a29df0d37905f2fdce091878d2ffd (diff)
Pan automation work. Almost, but not quite, working.
git-svn-id: svn://localhost/ardour2/trunk@2093 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/audio_time_axis.cc11
-rw-r--r--gtk2_ardour/automation_time_axis.cc20
-rw-r--r--gtk2_ardour/route_time_axis.cc6
3 files changed, 23 insertions, 14 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index 53c1a84848..d032aaca9f 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -317,10 +317,12 @@ AudioTimeAxisView::update_pans ()
/* This is a filthy kludge until the panner stuff gets up to speed. */
/* Remove all our old automation tracks. Slowly. */
- while (true) {
+ /*while (true) {
bool found = false;
for (AutomationTracks::iterator i = _automation_tracks.begin(); i != _automation_tracks.end(); ++i) {
if (i->first.type() == PanAutomation) {
+ remove_child(i->second->track);
+ delete i->second;
_automation_tracks.erase(i);
found = true;
break;
@@ -329,9 +331,10 @@ AudioTimeAxisView::update_pans ()
if ( ! found)
break;
- }
+ }*/
/* Man I hate that damn stereo->stereo panner */
+ uint32_t i = 0;
for (p = _route->panner().begin(); p != _route->panner().end(); ++p) {
boost::shared_ptr<AutomationTimeAxisView> pan_track(new AutomationTimeAxisView (_session,
_route, _route/*FIXME*/, (*p)->pan_control(),
@@ -339,7 +342,9 @@ AudioTimeAxisView::update_pans ()
*this,
parent_canvas,
_route->describe_parameter((*p)->pan_control()->list()->param_id()),
- (*p)->pan_control()->list()->param_id().to_string() /* FIXME: correct state name? */));
+ ParamID(PanAutomation, i).to_string()/* FIXME: correct state name? */));
+ add_automation_child(ParamID(PanAutomation, i), pan_track);
+ ++i;
}
}
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index 067fece9b0..465945fadf 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -170,6 +170,9 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
controls_table.attach (auto_button, 5, 8, 0, 1, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.attach (clear_button, 5, 8, 1, 2, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
+
+ /* add bar controller */
+ controls_table.attach (*_controller.get(), 0, 8, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
controls_table.show_all ();
@@ -382,14 +385,8 @@ AutomationTimeAxisView::set_height (TrackHeight ht)
//if (changed_between_small_and_normal || first_call_to_set_height) {
first_call_to_set_height = false;
switch (ht) {
- case Largest:
- case Large:
- case Larger:
-
- _controller->show ();
- controls_table.attach (*_controller.get(), 0, 8, 2, 3, Gtk::FILL|Gtk::EXPAND, Gtk::FILL|Gtk::EXPAND);
-
case Normal:
+ _controller->hide();
controls_table.remove (name_hbox);
@@ -413,8 +410,16 @@ AutomationTimeAxisView::set_height (TrackHeight ht)
clear_button.show();
hide_button.show_all();
break;
+
+ case Large:
+ case Larger:
+ case Largest:
+ _controller->show ();
+ break;
case Smaller:
+ _controller->hide();
+
case Small:
controls_table.remove (name_hbox);
@@ -436,6 +441,7 @@ AutomationTimeAxisView::set_height (TrackHeight ht)
hide_button.hide();
break;
}
+
//}
if (changed) {
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index 3d6c6823e8..3f37b73f12 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -451,8 +451,8 @@ RouteTimeAxisView::build_automation_action_menu ()
automation_items.push_back (*i->second->menu_item);
}
- i->second->menu_item->set_active(show_automation(i->second->param));
- //i->second->menu_item->set_active(false);
+ //i->second->menu_item->set_active(show_automation(i->second->param));
+ i->second->menu_item->set_active(false);
}
}
@@ -1796,8 +1796,6 @@ RouteTimeAxisView::add_automation_child(ParamID param, boost::shared_ptr<Automat
_show_automation.insert(param);
_route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
}
-
- build_automation_action_menu();
}