#include <ardour/location.h>
#include <ardour/panner.h>
#include <ardour/playlist.h>
+#include <ardour/profile.h>
#include <ardour/session.h>
#include <ardour/session_playlist.h>
#include <ardour/utils.h>
using namespace Gtk;
using namespace Editing;
-
AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::shared_ptr<Route> rt, Canvas& canvas)
: AxisView(sess)
, RouteTimeAxisView(ed, sess, rt, canvas)
/* ask for notifications of any new RegionViews */
_view->RegionViewAdded.connect (mem_fun(*this, &AudioTimeAxisView::region_view_added));
- _view->attach ();
- }
- post_construct ();
+ if (!editor.have_idled()) {
+ /* first idle will do what we need */
+ } else {
+ first_idle ();
+ }
+
+ } else {
+ post_construct ();
+ }
}
AudioTimeAxisView::~AudioTimeAxisView ()
{
}
+void
+AudioTimeAxisView::first_idle ()
+{
+ _view->attach ();
+ post_construct ();
+}
+
AudioStreamView*
AudioTimeAxisView::audio_view()
{
TimeAxisView::hide ();
}
-void
+int
AudioTimeAxisView::set_state (const XMLNode& node)
{
const XMLProperty *prop;
-
- TimeAxisView::set_state (node);
-
- if ((prop = node.property ("shown_editor")) != 0) {
- if (prop->value() == "no") {
- _marked_for_display = false;
+ int ret;
+
+ if ((ret = TimeAxisView::set_state (node)) != 0) {
+ return ret;
+ }
+
+ /* if the TimeAxisView had marked this not for display,
+ then do not allow this to override it.
+ */
+
+ if ((prop = node.property ("marked_for_display")) == 0) {
+ if ((prop = node.property ("shown_editor")) != 0) {
+ if (prop->value() == "no") {
+ _marked_for_display = false;
+ } else {
+ _marked_for_display = true;
+ }
} else {
_marked_for_display = true;
}
- } else {
- _marked_for_display = true;
}
XMLNodeList nlist = node.children();
continue;
}
}
+
+ return 0;
}
void
MenuList& items = display_menu->items();
// crossfade stuff
- items.push_back (MenuElem (_("Hide all crossfades"), mem_fun(*this, &AudioTimeAxisView::hide_all_xfades)));
- items.push_back (MenuElem (_("Show all crossfades"), mem_fun(*this, &AudioTimeAxisView::show_all_xfades)));
+ if (!Profile->get_sae()) {
+ items.push_back (MenuElem (_("Hide all crossfades"), mem_fun(*this, &AudioTimeAxisView::hide_all_xfades)));
+ items.push_back (MenuElem (_("Show all crossfades"), mem_fun(*this, &AudioTimeAxisView::show_all_xfades)));
+ }
// waveform menu
Menu *waveform_menu = manage(new Menu);
waveform_items.push_back (RadioMenuElem (group, _("Traditional"), bind (mem_fun(*this, &AudioTimeAxisView::set_waveform_shape), Traditional)));
traditional_item = static_cast<RadioMenuItem *> (&waveform_items.back());
- waveform_items.push_back (RadioMenuElem (group, _("Rectified"), bind (mem_fun(*this, &AudioTimeAxisView::set_waveform_shape), Rectified)));
- rectified_item = static_cast<RadioMenuItem *> (&waveform_items.back());
+ if (!Profile->get_sae()) {
+ waveform_items.push_back (RadioMenuElem (group, _("Rectified"), bind (mem_fun(*this, &AudioTimeAxisView::set_waveform_shape), Rectified)));
+ rectified_item = static_cast<RadioMenuItem *> (&waveform_items.back());
+ } else {
+ rectified_item = 0;
+ }
waveform_items.push_back (SeparatorElem());
AudioStreamView* asv = audio_view();
if (asv) {
ignore_toggle = true;
- if (asv->get_waveform_shape() == Rectified)
+ if (asv->get_waveform_shape() == Rectified && rectified_item) {
rectified_item->set_active(true);
- else traditional_item->set_active(true);
+ } else {
+ traditional_item->set_active(true);
+ }
if (asv->get_waveform_scale() == LogWaveform)
logscale_item->set_active(true);
void
AudioTimeAxisView::toggle_gain_track ()
{
-
bool showit = gain_automation_item->get_active();
if (showit != gain_track->marked_for_display()) {
/* now trigger a redisplay */
if (!no_redraw) {
- _route->gui_changed (X_("track_height"), (void *) 0); /* EMIT_SIGNAL */
+ _route->gui_changed (X_("visible_tracks"), (void *) 0); /* EMIT_SIGNAL */
}
}
}
gain_automation_item->set_active (false);
}
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
void
/* now trigger a redisplay */
if (!no_redraw) {
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
}
}
pan_automation_item->set_active (false);
}
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
void
no_redraw = false;
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
void
no_redraw = false;
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
void
RouteTimeAxisView::hide_all_automation();
no_redraw = false;
- _route->gui_changed ("track_height", (void *) 0); /* EMIT_SIGNAL */
+ _route->gui_changed ("visible_tracks", (void *) 0); /* EMIT_SIGNAL */
}
void
{
if (is_audio_track()) {
if (_route->active()) {
- controls_ebox.set_name ("AudioTrackControlsBaseUnselected");
controls_base_selected_name = "AudioTrackControlsBaseSelected";
controls_base_unselected_name = "AudioTrackControlsBaseUnselected";
} else {
- controls_ebox.set_name ("AudioTrackControlsBaseInactiveUnselected");
controls_base_selected_name = "AudioTrackControlsBaseInactiveSelected";
controls_base_unselected_name = "AudioTrackControlsBaseInactiveUnselected";
}
} else {
if (_route->active()) {
- controls_ebox.set_name ("BusControlsBaseUnselected");
controls_base_selected_name = "BusControlsBaseSelected";
controls_base_unselected_name = "BusControlsBaseUnselected";
} else {
- controls_ebox.set_name ("BusControlsBaseInactiveUnselected");
controls_base_selected_name = "BusControlsBaseInactiveSelected";
controls_base_unselected_name = "BusControlsBaseInactiveUnselected";
}
}
+
+ if (get_selected()) {
+ controls_ebox.set_name (controls_base_selected_name);
+ } else {
+ controls_ebox.set_name (controls_base_unselected_name);
+ }
}
XMLNode*