13
0

Prevent the new session dialog from appearing

This commit is contained in:
Roy Vegard Ovesen 2013-03-30 18:15:57 +01:00
parent 6ef371745a
commit 43b94f7aa7
2 changed files with 7 additions and 13 deletions

View File

@ -2447,7 +2447,7 @@ ARDOUR_UI::build_session_from_nsd (const std::string& session_path, const std::s
{
BusProfile bus_profile;
if (Profile->get_sae()) {
if (nsm || Profile->get_sae()) {
bus_profile.master_out_channels = 2;
bus_profile.input_ac = AutoConnectPhysical;
@ -2591,6 +2591,10 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
session_name = _startup->session_name (likely_new);
if (nsm) {
likely_new = true;
}
string::size_type suffix = session_name.find (statefile_suffix);
if (suffix != string::npos) {
@ -2642,7 +2646,7 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
if (Glib::file_test (session_path, Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) {
if (likely_new) {
if (likely_new && !nsm) {
std::string existing = Glib::build_filename (session_path, session_name);

View File

@ -23,8 +23,6 @@
#include "ardour_ui.h"
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
@ -50,18 +48,10 @@ NSM_Client::command_open(const char *name,
char **out_msg)
{
int r = ERR_OK;
struct stat buffer;
ARDOUR_COMMAND_LINE::new_session = true;
ARDOUR_COMMAND_LINE::new_session = false;
ARDOUR_COMMAND_LINE::session_name = name;
ARDOUR_COMMAND_LINE::jack_client_name = client_id;
int f = stat(name, &buffer);
if (f == 0 && S_ISDIR(buffer.st_mode))
{
ARDOUR_COMMAND_LINE::new_session = false;
}
return r;
}