diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-23 23:13:07 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-23 23:13:07 -0400 |
commit | 2c9644320fd8ec04ce88c16ee4331679deaa999f (patch) | |
tree | 596ffee682e0280822e894553e88badf6e168710 /gtk2_ardour/ardour_ui.cc | |
parent | f7b6a27de6c63795be79991ffae993932a9fa0eb (diff) |
tighten up layout of session dialog; make button say cancel or quit in difference scenarios
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 129b77f0a4..e98e3e00a0 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2529,6 +2529,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri string template_name; int ret = -1; bool likely_new = false; + bool cancel_not_quit; /* deal with any existing DIRTY session now, rather than later. don't * treat a non-dirty session this way, so that it stays visible @@ -2539,6 +2540,11 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri ARDOUR_UI::instance()->video_timeline->sync_session_state(); } + /* if there is already a session, relabel the button + on the SessionDialog so that we don't Quit directly + */ + cancel_not_quit = (_session != 0); + if (_session && _session->dirty()) { if (unload_session (false)) { /* unload cancelled by user */ @@ -2552,7 +2558,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri template_name = load_template; } - SessionDialog session_dialog (should_be_new, session_name, session_path, load_template); + SessionDialog session_dialog (should_be_new, session_name, session_path, load_template, cancel_not_quit); while (ret != 0) { |