summaryrefslogtreecommitdiff
path: root/gtk2_ardour/main.cc
diff options
context:
space:
mode:
authorSampo Savolainen <v2@iki.fi>2006-08-08 21:27:41 +0000
committerSampo Savolainen <v2@iki.fi>2006-08-08 21:27:41 +0000
commit3220684ade5f3503af2889130718042a5cb898d7 (patch)
treec4a1d02c1ecced601c93c6322e846d836663de1a /gtk2_ardour/main.cc
parentfb8903e443eadb265d049c9921afa23b2a672584 (diff)
New session dialog fixups:
- The name specified on the command line for the new session comes up in the dialog - The editor will not appear below the NSD at startup Command line parameter fixups: - You can't specify both a new session and a old session to load at the same time. - Ardour will abort if command line parameters are incorrect Declick faster. Fixes audible and annoying volume ramps when running ardour at large buffer sizes. Make it impossible to arm tracks which have un-connected inputs. git-svn-id: svn://localhost/ardour2/trunk@765 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/main.cc')
-rw-r--r--gtk2_ardour/main.cc73
1 files changed, 28 insertions, 45 deletions
diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc
index 047bb130a4..d2550754f6 100644
--- a/gtk2_ardour/main.cc
+++ b/gtk2_ardour/main.cc
@@ -293,60 +293,43 @@ Please consider the possibilities, and perhaps (re)start JACK."));
static bool
maybe_load_session ()
{
+ /* If no session name is given: we're not loading a session yet, nor creating a new one */
+ if (!session_name.length()) {
+ ui->hide_splash ();
+ if (!Config->get_no_new_session_dialog()) {
+ ui->new_session (true);
+ }
- /* load session, if given */
- string name, path;
-
- if (session_name.length()){
- bool isnew;
-
- if (Session::find_session (session_name, path, name, isnew)) {
- error << string_compose(_("could not load command line session \"%1\""), session_name) << endmsg;
- } else {
-
- if (new_session) {
-
- /* command line required that the session be new */
-
- if (isnew) {
-
- /* popup the new session dialog
- once everything else is OK.
- */
-
- Glib::signal_idle().connect (bind (mem_fun (*ui, &ARDOUR_UI::cmdline_new_session), path));
- ui->set_will_create_new_session_automatically (true);
-
- } else {
-
- /* it wasn't new, but we require a new session */
+ return true;
+ }
- error << string_compose (_("\n\nA session named \"%1\" already exists.\n\
-To avoid this message, start ardour as \"ardour %1"), path)
- << endmsg;
- return false;
- }
+ /* Load session or start the new session dialog */
+ string name, path;
- } else {
+ bool isnew;
- /* command line didn't require a new session */
-
- if (isnew) {
- error << string_compose (_("\n\nNo session named \"%1\" exists.\n\
-To create it from the command line, start ardour as \"ardour --new %1"), path)
- << endmsg;
- return false;
- }
+ if (Session::find_session (session_name, path, name, isnew)) {
+ error << string_compose(_("could not load command line session \"%1\""), session_name) << endmsg;
+ return false;
+ }
- ui->load_session (path, name);
- }
+ if (!new_session) {
+
+ /* Loading a session, but the session doesn't exist */
+ if (isnew) {
+ error << string_compose (_("\n\nNo session named \"%1\" exists.\n\
+To create it from the command line, start ardour as \"ardour --new %1"), path) << endmsg;
+ return false;
}
- if (no_splash) {
- ui->show();
- }
+ ui->load_session (path, name);
} else {
+ /* TODO: This bit of code doesn't work properly yet
+ Glib::signal_idle().connect (bind (mem_fun (*ui, &ARDOUR_UI::cmdline_new_session), path));
+ ui->set_will_create_new_session_automatically (true); */
+
+ /* Show the NSD */
ui->hide_splash ();
if (!Config->get_no_new_session_dialog()) {
ui->new_session (true);