make save-as dialog be persistent, to retain settings across save-as
This commit is contained in:
parent
b38ab89d92
commit
e47a22a118
|
@ -240,7 +240,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
|||
, big_clock_window (X_("big-clock"), _("Big Clock"), boost::bind (&ARDOUR_UI::create_big_clock_window, this))
|
||||
, audio_port_matrix (X_("audio-connection-manager"), _("Audio Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::AUDIO))
|
||||
, midi_port_matrix (X_("midi-connection-manager"), _("MIDI Connections"), boost::bind (&ARDOUR_UI::create_global_port_matrix, this, ARDOUR::DataType::MIDI))
|
||||
|
||||
, save_as_dialog (0)
|
||||
, _status_bar_visibility (X_("status-bar"))
|
||||
, _feedback_exists (false)
|
||||
, _log_not_acknowledged (LogLevelNone)
|
||||
|
@ -2403,9 +2403,17 @@ ARDOUR_UI::save_session_as ()
|
|||
return;
|
||||
}
|
||||
|
||||
SaveAsDialog sad;
|
||||
if (!save_as_dialog) {
|
||||
save_as_dialog = new SaveAsDialog;
|
||||
} else {
|
||||
save_as_dialog->clear_name ();
|
||||
}
|
||||
|
||||
switch (sad.run()) {
|
||||
int response = save_as_dialog->run ();
|
||||
|
||||
save_as_dialog->hide ();
|
||||
|
||||
switch (response) {
|
||||
case Gtk::RESPONSE_OK:
|
||||
break;
|
||||
default:
|
||||
|
@ -2421,13 +2429,13 @@ ARDOUR_UI::save_session_as ()
|
|||
label.show ();
|
||||
progress_bar.show ();
|
||||
|
||||
Session::SaveAs sa;
|
||||
Session::SaveAs sa;
|
||||
|
||||
sa.new_parent_folder = sad.new_parent_folder ();
|
||||
sa.new_name = sad.new_name ();
|
||||
sa.switch_to = sad.switch_to();
|
||||
sa.copy_media = sad.copy_media();
|
||||
sa.copy_external = sad.copy_external();
|
||||
sa.new_parent_folder = save_as_dialog->new_parent_folder ();
|
||||
sa.new_name = save_as_dialog->new_name ();
|
||||
sa.switch_to = save_as_dialog->switch_to();
|
||||
sa.copy_media = save_as_dialog->copy_media();
|
||||
sa.copy_external = save_as_dialog->copy_external();
|
||||
|
||||
/* this signal will be emitted from within this, the calling thread,
|
||||
* after every file is copied. It provides information on percentage
|
||||
|
|
|
@ -102,6 +102,7 @@ class Mixer_UI;
|
|||
class PublicEditor;
|
||||
class RCOptionEditor;
|
||||
class RouteParams_UI;
|
||||
class SaveAsDialog;
|
||||
class SessionDialog;
|
||||
class SessionOptionEditor;
|
||||
class ShuttleControl;
|
||||
|
@ -617,6 +618,9 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr
|
|||
guint32 last_key_press_time;
|
||||
|
||||
void snapshot_session (bool switch_to_it);
|
||||
|
||||
SaveAsDialog* save_as_dialog;
|
||||
|
||||
bool save_as_progress_update (float fraction, int64_t cnt, int64_t total, Gtk::Label* label, Gtk::ProgressBar* bar);
|
||||
void save_session_as ();
|
||||
void rename_session ();
|
||||
|
|
|
@ -111,3 +111,10 @@ SaveAsDialog::copy_external () const
|
|||
{
|
||||
return copy_external_button.get_active ();
|
||||
}
|
||||
|
||||
void
|
||||
SaveAsDialog::clear_name ()
|
||||
{
|
||||
new_name_entry.set_text ("");
|
||||
set_response_sensitive (RESPONSE_OK, false);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,9 @@ public:
|
|||
bool switch_to () const;
|
||||
bool copy_media () const;
|
||||
bool copy_external () const;
|
||||
|
||||
|
||||
void clear_name ();
|
||||
|
||||
private:
|
||||
Gtk::CheckButton switch_to_button;
|
||||
Gtk::CheckButton copy_media_button;
|
||||
|
|
Loading…
Reference in New Issue