diff options
author | Robin Gareus <robin@gareus.org> | 2015-09-19 20:28:56 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-09-19 20:28:56 +0200 |
commit | dad0e390ff247a4b0ac0da244fdf9b8a9550cec5 (patch) | |
tree | 4831b86613921c2aa2b8ac373513cec8ade54ebb | |
parent | c829c10a74475ef6157408aa0e234b2a0fd43917 (diff) |
indicate that silence trim is already active.
-rw-r--r-- | gtk2_ardour/strip_silence_dialog.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/strip_silence_dialog.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gtk2_ardour/strip_silence_dialog.cc b/gtk2_ardour/strip_silence_dialog.cc index 01d6487f74..30f5db8d4a 100644 --- a/gtk2_ardour/strip_silence_dialog.cc +++ b/gtk2_ardour/strip_silence_dialog.cc @@ -91,8 +91,8 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list<RegionView*> const & v) get_vbox()->pack_start (*hbox, false, false); - add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); - add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_OK); + cancel_button = add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); + apply_button = add_button (Gtk::Stock::APPLY, Gtk::RESPONSE_OK); set_default_response (Gtk::RESPONSE_OK); get_vbox()->pack_start (_progress_bar, true, true, 12); @@ -141,9 +141,15 @@ StripSilenceDialog::silences (AudioIntervalMap& m) void StripSilenceDialog::drop_rects () { + // called by parent when starting to progess (dialog::run returned), + // but before the dialog is destoyed. + for (list<ViewInterval>::iterator v = views.begin(); v != views.end(); ++v) { v->view->drop_silent_frames (); } + + cancel_button->set_sensitive (false); + apply_button->set_sensitive (false); } void diff --git a/gtk2_ardour/strip_silence_dialog.h b/gtk2_ardour/strip_silence_dialog.h index e89f1911cd..225b4461a2 100644 --- a/gtk2_ardour/strip_silence_dialog.h +++ b/gtk2_ardour/strip_silence_dialog.h @@ -66,6 +66,9 @@ private: AudioClock* _fade_length; Gtk::ProgressBar _progress_bar; + Gtk::Button* cancel_button; + Gtk::Button* apply_button; + struct ViewInterval { RegionView* view; ARDOUR::AudioIntervalResult intervals; |