reinstate ArdourUI::idle_load(), need by OS X build

git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4070 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2008-10-31 07:39:25 +00:00
parent 040d7fec2c
commit 73cc3a189d
2 changed files with 23 additions and 0 deletions

View file

@ -2156,6 +2156,28 @@ ARDOUR_UI::loading_message (const std::string& msg)
flush_pending ();
}
void
ARDOUR_UI::idle_load (const Glib::ustring& path)
{
if (session) {
if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
/* /path/to/foo => /path/to/foo, foo */
load_session (path, basename_nosuffix (path));
} else {
/* /path/to/foo/foo.ardour => /path/to/foo, foo */
load_session (Glib::path_get_dirname (path), basename_nosuffix (path));
}
} else {
ARDOUR_COMMAND_LINE::session_name = path;
if (new_session_dialog) {
/* make it break out of Dialog::run() and
start again.
*/
new_session_dialog->response (1);
}
}
}
bool
ARDOUR_UI::get_session_parameters (bool backend_audio_is_running, bool should_be_new)
{

View file

@ -116,6 +116,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void show_about ();
void hide_about ();
void idle_load (Glib::ustring& path);
void finish();
int load_session (const Glib::ustring& path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring());