Move StripSilenceDialog XML to dedicated function
This moves the Session::add_extra_xml() call out of editor_ops.cc and moves it to its own class method StripSilenceDialog::finished()
This commit is contained in:
parent
d5988b232c
commit
f44a436f70
@ -5522,7 +5522,6 @@ Editor::strip_region_silence ()
|
|||||||
StripSilence s (*_session, silences, d.fade_length());
|
StripSilence s (*_session, silences, d.fade_length());
|
||||||
|
|
||||||
apply_filter (s, _("strip silence"), &d);
|
apply_filter (s, _("strip silence"), &d);
|
||||||
_session->add_extra_xml(d.get_state());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,6 +131,8 @@ StripSilenceDialog::StripSilenceDialog (Session* s, list<RegionView*> const & v)
|
|||||||
Completed.connect (_completed_connection, invalidator(*this), boost::bind (&StripSilenceDialog::update, this), gui_context ());
|
Completed.connect (_completed_connection, invalidator(*this), boost::bind (&StripSilenceDialog::update, this), gui_context ());
|
||||||
_thread_should_finish = false;
|
_thread_should_finish = false;
|
||||||
pthread_create (&_thread, 0, StripSilenceDialog::_detection_thread_work, this);
|
pthread_create (&_thread, 0, StripSilenceDialog::_detection_thread_work, this);
|
||||||
|
|
||||||
|
signal_response().connect(sigc::mem_fun (*this, &StripSilenceDialog::finished));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -365,3 +367,11 @@ void
|
|||||||
StripSilenceDialog::set_state (const XMLNode &)
|
StripSilenceDialog::set_state (const XMLNode &)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
StripSilenceDialog::finished(int response)
|
||||||
|
{
|
||||||
|
if(response == Gtk::RESPONSE_OK) {
|
||||||
|
_session->add_extra_xml(get_state());
|
||||||
|
}
|
||||||
|
}
|
@ -71,6 +71,7 @@ private:
|
|||||||
void threshold_changed ();
|
void threshold_changed ();
|
||||||
void update_progress_gui (float);
|
void update_progress_gui (float);
|
||||||
void restart_thread ();
|
void restart_thread ();
|
||||||
|
void finished(int);
|
||||||
|
|
||||||
Gtk::SpinButton _threshold;
|
Gtk::SpinButton _threshold;
|
||||||
AudioClock* _minimum_length;
|
AudioClock* _minimum_length;
|
||||||
|
Loading…
Reference in New Issue
Block a user