diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-10-31 07:39:25 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-10-31 07:39:25 +0000 |
commit | 73cc3a189d994a0711e091580bc049297acd981c (patch) | |
tree | 106444c458d75b72fca96d7af1153167c69a2344 /gtk2_ardour/ardour_ui.cc | |
parent | 040d7fec2c23216be7533b727cde4407fb2f8036 (diff) |
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
Diffstat (limited to 'gtk2_ardour/ardour_ui.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 09ec2e7e88..df7ca68f25 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -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) { |