diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 59cedbfcb7..d7a3510eba 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -223,7 +223,7 @@ public: RCOptionEditor* get_rc_option_editor() { return rc_option_editor; } void show_tabbable (ArdourWidgets::Tabbable*); - void start_session_load (); + void start_session_load (bool create_new); void session_dialog_response_handler (int response, SessionDialog* session_dialog); int build_session_from_dialog (SessionDialog&, const std::string& session_name, const std::string& session_path); bool ask_about_loading_existing_session (const std::string& session_path); diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 800eedde2d..42d771131f 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -171,7 +171,7 @@ ARDOUR_UI::install_actions () /* the real actions */ - act = ActionManager::register_action (main_actions, X_("New"), _("New..."), hide_return (sigc::mem_fun(*this, &ARDOUR_UI::start_session_load))); + act = ActionManager::register_action (main_actions, X_("New"), _("New..."), hide_return (sigc::bind (sigc::mem_fun(*this, &ARDOUR_UI::start_session_load), true))); ActionManager::register_action (main_actions, X_("Open"), _("Open..."), sigc::mem_fun(*this, &ARDOUR_UI::open_session)); ActionManager::register_action (main_actions, X_("Recent"), _("Recent..."), sigc::mem_fun(*this, &ARDOUR_UI::open_recent_session)); diff --git a/gtk2_ardour/ardour_ui_session.cc b/gtk2_ardour/ardour_ui_session.cc index f6c4ac4568..8550b5e235 100644 --- a/gtk2_ardour/ardour_ui_session.cc +++ b/gtk2_ardour/ardour_ui_session.cc @@ -132,7 +132,7 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess * loaded. The startup case is handled by StartupFSM */ void -ARDOUR_UI::start_session_load () +ARDOUR_UI::start_session_load (bool create_new) { /* deal with any existing DIRTY session now, rather than later. don't * treat a non-dirty session this way, so that it stays visible @@ -150,7 +150,7 @@ ARDOUR_UI::start_session_load () } } - SessionDialog* session_dialog = new SessionDialog (true, string(), Config->get_default_session_parent_dir(), string(), true); + SessionDialog* session_dialog = new SessionDialog (create_new, string(), Config->get_default_session_parent_dir(), string(), true); session_dialog->signal_response().connect (sigc::bind (sigc::mem_fun (*this, &ARDOUR_UI::session_dialog_response_handler), session_dialog)); session_dialog->present (); } @@ -315,7 +315,7 @@ ARDOUR_UI::close_session() return; } - start_session_load (); + start_session_load (false); }