-void
-ARDOUR_UI::fontconfig_dialog ()
-{
-#ifdef GTKOSX
- /* X11 users will always have fontconfig info around, but new GTK-OSX users
- may not and it can take a while to build it. Warn them.
- */
-
- std::string fontconfig = Glib::build_filename (Glib::get_home_dir(), ".fontconfig");
-
- if (!Glib::file_test (fontconfig, Glib::FILE_TEST_EXISTS|Glib::FILE_TEST_IS_DIR)) {
- MessageDialog msg (*_startup,
- string_compose (_("Welcome to %1.\n\n"
- "The program will take a bit longer to start up\n"
- "while the system fonts are checked.\n\n"
- "This will only be done once, and you will\n"
- "not see this message again\n"), PROGRAM_NAME),
- true,
- Gtk::MESSAGE_INFO,
- Gtk::BUTTONS_OK);
- pop_back_splash ();
- msg.show_all ();
- msg.present ();
- msg.run ();
- }
-#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);
-}
-