VBAP rework (part III): fix position computation backend & GUI
[ardour.git] / gtk2_ardour / main.cc
index f55405a84da856b20b2d57b93fc61d120614a365..d212edef92fdfd2bb3f5f97baf46fc731cfb4f63 100644 (file)
@@ -37,8 +37,6 @@
 #include "pbd/boost_debug.h"
 #endif
 
-#include <jack/jack.h>
-
 #include "ardour/revision.h"
 #include "ardour/version.h"
 #include "ardour/ardour.h"
@@ -81,17 +79,10 @@ static const char* localedir = LOCALEDIR;
 void
 gui_jack_error ()
 {
-       MessageDialog win (string_compose (_("%1 could not connect to JACK."), PROGRAM_NAME),
+       MessageDialog win (string_compose (_("%1 could not connect to the audio backend."), PROGRAM_NAME),
                           false,
                           Gtk::MESSAGE_INFO,
                           Gtk::BUTTONS_NONE);
-       win.set_secondary_text(string_compose (_("There are several possible reasons:\n\
-\n\
-1) JACK is not running.\n\
-2) JACK is running as another user, perhaps root.\n\
-3) There is already another client called \"%1\".\n\
-\n\
-Please consider the possibilities, and perhaps (re)start JACK."), PROGRAM_NAME));
 
        win.add_button (Stock::QUIT, RESPONSE_CLOSE);
        win.set_default_response (RESPONSE_CLOSE);
@@ -163,7 +154,7 @@ fixup_bundle_environment (int, char* [])
                
                vector<string> lpath;
                lpath.push_back (bundle_dir);
-               lpath.push_back ("share");
+               lpath.push_back ("Resources");
                lpath.push_back ("locale");
                localedir = strdup (Glib::build_filename (lpath).c_str());
        }
@@ -182,10 +173,10 @@ fixup_bundle_environment (int, char* [])
        export_search_path (bundle_dir, "ARDOUR_INSTANT_XML_PATH", "/Resources");
        export_search_path (bundle_dir, "LADSPA_PATH", "/Plugins");
        export_search_path (bundle_dir, "VAMP_PATH", "/lib");
-       export_search_path (bundle_dir, "SUIL_MODULE_DIR", "/lib");
        export_search_path (bundle_dir, "GTK_PATH", "/lib/gtkengines");
 
-       g_setenv ("PATH", (bundle_dir + "/MacOS:" + std::string(getenv ("PATH"))).c_str(), 1);
+       g_setenv ("SUIL_MODULE_DIR", (bundle_dir + "/lib").c_str(), 1);
+       g_setenv ("PATH", (bundle_dir + "/MacOS:" + std::string(g_getenv ("PATH"))).c_str(), 1);
 
        /* unset GTK_RC_FILES so that we only load the RC files that we define
         */
@@ -292,10 +283,10 @@ fixup_bundle_environment (int /*argc*/, char* argv[])
        export_search_path (dir_path, "ARDOUR_DATA_PATH", "/share");
        export_search_path (dir_path, "LADSPA_PATH", "/plugins");
        export_search_path (dir_path, "VAMP_PATH", "/lib");
-       export_search_path (dir_path, "SUIL_MODULE_DIR", "/lib");
        export_search_path (dir_path, "GTK_PATH", "/lib/gtkengines");
 
-       g_setenv ("PATH", (dir_path + "/bin:" + std::string(getenv ("PATH"))).c_str(), 1);
+       g_setenv ("SUIL_MODULE_DIR", (dir_path + "/lib").c_str(), 1);
+       g_setenv ("PATH", (dir_path + "/bin:" + std::string(g_getenv ("PATH"))).c_str(), 1);
 
        /* unset GTK_RC_FILES so that we only load the RC files that we define
         */
@@ -515,7 +506,7 @@ int main (int argc, char *argv[])
                return curvetest (curvetest_file);
        }
 
-#ifndef WIN32
+#ifndef PLATFORM_WINDOWS
        if (::signal (SIGPIPE, sigpipe_handler)) {
                cerr << _("Cannot xinstall SIGPIPE error handler") << endl;
        }
@@ -530,6 +521,7 @@ int main (int argc, char *argv[])
 
        ui->run (text_receiver);
        Gtkmm2ext::Application::instance()->cleanup();
+       delete ui;
        ui = 0;
 
        ARDOUR::cleanup ();