From: Paul Davis Date: Fri, 17 Aug 2007 21:13:53 +0000 (+0000) Subject: more cleanups for SAE, this time trimming down the region context menu X-Git-Tag: 2.8.16~2020 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=1b530751ed0b505c11bd22e843114a4287b0a6b9;p=ardour.git more cleanups for SAE, this time trimming down the region context menu git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2324 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 93a3daf069..4f7192e373 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -179,15 +180,17 @@ AudioRegionView::init (Gdk::Color& basic_color, bool wfd) foo += ':'; foo += "gain"; - gain_line = new AudioRegionGainLine (foo, trackview.session(), *this, *group, audio_region()->envelope()); + if (!Profile->get_sae()) { + gain_line = new AudioRegionGainLine (foo, trackview.session(), *this, *group, audio_region()->envelope()); - if (!(_flags & EnvelopeVisible)) { - gain_line->hide (); - } else { - gain_line->show (); - } + if (!(_flags & EnvelopeVisible)) { + gain_line->hide (); + } else { + gain_line->show (); + } - gain_line->reset (); + gain_line->reset (); + } set_height (trackview.height); diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index b161c1498a..bff8bcdb4f 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -54,6 +54,7 @@ #include #include #include +#include #include @@ -1264,12 +1265,17 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i } items.push_back (SeparatorElem()); - - items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Linear))); - items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Fast))); - items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogB))); - items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogA))); - items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Slow))); + + if (Profile->get_sae()) { + items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Linear))); + items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Fast))); + } else { + items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Linear))); + items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Fast))); + items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogB))); + items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::LogA))); + items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_in_shape), AudioRegion::Slow))); + } break; case FadeOutItem: @@ -1281,13 +1287,17 @@ Editor::popup_fade_context_menu (int button, int32_t time, ArdourCanvas::Item* i } items.push_back (SeparatorElem()); - - items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Linear))); - items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Slow))); - items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogA))); - items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogB))); - items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Fast))); + if (Profile->get_sae()) { + items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Linear))); + items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Slow))); + } else { + items.push_back (MenuElem (_("Linear"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Linear))); + items.push_back (MenuElem (_("Slowest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Slow))); + items.push_back (MenuElem (_("Slow"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogA))); + items.push_back (MenuElem (_("Fast"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::LogB))); + items.push_back (MenuElem (_("Fastest"), bind (mem_fun (*this, &Editor::set_fade_out_shape), AudioRegion::Fast))); + } break; default: @@ -1674,13 +1684,15 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr fooc.block (false); } - items.push_back (CheckMenuElem (_("Opaque"))); - region_opaque_item = static_cast(&items.back()); - fooc = region_opaque_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_region_opaque)); - if (region->opaque()) { - fooc.block (true); - region_opaque_item->set_active(); - fooc.block (false); + if (!Profile->get_sae()) { + items.push_back (CheckMenuElem (_("Opaque"))); + region_opaque_item = static_cast(&items.back()); + fooc = region_opaque_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_region_opaque)); + if (region->opaque()) { + fooc.block (true); + region_opaque_item->set_active(); + fooc.block (false); + } } items.push_back (CheckMenuElem (_("Original position"), mem_fun(*this, &Editor::naturalize))); @@ -1695,28 +1707,30 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr RegionView* rv = sv->find_view (ar); AudioRegionView* arv = dynamic_cast(rv); - items.push_back (MenuElem (_("Reset Envelope"), mem_fun(*this, &Editor::reset_region_gain_envelopes))); - - items.push_back (CheckMenuElem (_("Envelope Visible"))); - region_envelope_visible_item = static_cast (&items.back()); - fooc = region_envelope_visible_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_gain_envelope_visibility)); - if (arv->envelope_visible()) { - fooc.block (true); - region_envelope_visible_item->set_active (true); - fooc.block (false); - } - - items.push_back (CheckMenuElem (_("Envelope Active"))); - region_envelope_active_item = static_cast (&items.back()); - fooc = region_envelope_active_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_gain_envelope_active)); + if (!Profile->get_sae()) { + items.push_back (MenuElem (_("Reset Envelope"), mem_fun(*this, &Editor::reset_region_gain_envelopes))); + + items.push_back (CheckMenuElem (_("Envelope Visible"))); + region_envelope_visible_item = static_cast (&items.back()); + fooc = region_envelope_visible_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_gain_envelope_visibility)); + if (arv->envelope_visible()) { + fooc.block (true); + region_envelope_visible_item->set_active (true); + fooc.block (false); + } - if (ar->envelope_active()) { - fooc.block (true); - region_envelope_active_item->set_active (true); - fooc.block (false); - } + items.push_back (CheckMenuElem (_("Envelope Active"))); + region_envelope_active_item = static_cast (&items.back()); + fooc = region_envelope_active_item->signal_activate().connect (mem_fun(*this, &Editor::toggle_gain_envelope_active)); + + if (ar->envelope_active()) { + fooc.block (true); + region_envelope_active_item->set_active (true); + fooc.block (false); + } - items.push_back (SeparatorElem()); + items.push_back (SeparatorElem()); + } if (ar->scale_amplitude() != 1.0f) { items.push_back (MenuElem (_("DeNormalize"), mem_fun(*this, &Editor::denormalize_region))); @@ -1724,10 +1738,10 @@ Editor::add_region_context_items (AudioStreamView* sv, boost::shared_ptr items.push_back (MenuElem (_("Normalize"), mem_fun(*this, &Editor::normalize_region))); } } + items.push_back (MenuElem (_("Reverse"), mem_fun(*this, &Editor::reverse_region))); items.push_back (SeparatorElem()); - /* range related stuff */ items.push_back (MenuElem (_("Add Range Markers"), mem_fun (*this, &Editor::add_location_from_audio_region)));