diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 79e89499b8..dd6489f46e 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2298,74 +2298,6 @@ ARDOUR_UI::fontconfig_dialog () #endif } -void -ARDOUR_UI::parse_cmdline_path (const std::string& cmdline_path, std::string& session_name, std::string& session_path, bool& existing_session) -{ - existing_session = false; - - if (Glib::file_test (cmdline_path, Glib::FILE_TEST_IS_DIR)) { - session_path = cmdline_path; - existing_session = true; - } else if (Glib::file_test (cmdline_path, Glib::FILE_TEST_IS_REGULAR)) { - session_path = Glib::path_get_dirname (string (cmdline_path)); - existing_session = true; - } else { - /* it doesn't exist, assume the best */ - session_path = Glib::path_get_dirname (string (cmdline_path)); - } - - session_name = basename_nosuffix (string (cmdline_path)); -} - -int -ARDOUR_UI::load_cmdline_session (const std::string& session_name, const std::string& session_path, bool& existing_session) -{ - /* when this is called, the backend audio system must be running */ - - /* the main idea here is to deal with the fact that a cmdline argument for the session - can be interpreted in different ways - it could be a directory or a file, and before - we load, we need to know both the session directory and the snapshot (statefile) within it - that we are supposed to use. - */ - - if (session_name.length() == 0 || session_path.length() == 0) { - return false; - } - - if (Glib::file_test (session_path, Glib::FILE_TEST_IS_DIR)) { - - std::string predicted_session_file; - - predicted_session_file = session_path; - predicted_session_file += '/'; - predicted_session_file += session_name; - predicted_session_file += ARDOUR::statefile_suffix; - - if (Glib::file_test (predicted_session_file, Glib::FILE_TEST_EXISTS)) { - existing_session = true; - } - - } else if (Glib::file_test (session_path, Glib::FILE_TEST_EXISTS)) { - - if (session_path.find (ARDOUR::statefile_suffix) == session_path.length() - 7) { - /* existing .ardour file */ - existing_session = true; - } - - } else { - existing_session = false; - } - - /* lets just try to load it */ - - if (create_engine ()) { - backend_audio_error (false, _startup); - return -1; - } - - return load_session (session_path, session_name); -} - bool ARDOUR_UI::ask_about_loading_existing_session (const std::string& session_path) { diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h index 23c5775670..793f279e2a 100644 --- a/gtk2_ardour/ardour_ui.h +++ b/gtk2_ardour/ardour_ui.h @@ -140,8 +140,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI, public ARDOUR::SessionHandlePtr } int get_session_parameters (bool quit_on_cancel, bool should_be_new = false, std::string load_template = ""); - void parse_cmdline_path (const std::string& cmdline_path, std::string& session_name, std::string& session_path, bool& existing_session); - int load_cmdline_session (const std::string& session_name, const std::string& session_path, bool& existing_session); int build_session_from_nsd (const std::string& session_name, const std::string& session_path); bool ask_about_loading_existing_session (const std::string& session_path); diff --git a/libs/ardour/ardour/ardour.h b/libs/ardour/ardour/ardour.h index 1e94602839..4a7077756b 100644 --- a/libs/ardour/ardour/ardour.h +++ b/libs/ardour/ardour/ardour.h @@ -56,7 +56,6 @@ namespace ARDOUR { extern PBD::PropertyChange bounds_change; - std::string get_ardour_revision (); extern const char* const ardour_config_info; void find_bindings_files (std::map&); diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index fd70aa34d7..751a671d41 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -355,12 +355,6 @@ ARDOUR::cleanup () return 0; } -string -ARDOUR::get_ardour_revision () -{ - return "$Rev$"; -} - void ARDOUR::find_bindings_files (map& files) {