tweak Stateful/StatefulDiffCommand changes so that SessionObject's actually get a...
[ardour.git] / gtk2_ardour / main.cc
index bf1e6a39781cc97ebb209072ab94c9d5a11eaf6b..6ad5d245d8bd14565bc349ccbfab2c4c39b82c2e 100644 (file)
@@ -55,7 +55,6 @@ using namespace Gtk;
 using namespace ARDOUR_COMMAND_LINE;
 using namespace ARDOUR;
 using namespace PBD;
-using namespace sigc;
 
 TextReceiver text_receiver ("ardour");
 
@@ -312,14 +311,16 @@ int main (int argc, char *argv[])
        fixup_bundle_environment ();
 #endif
 
-       Glib::thread_init();
+       if (!Glib::thread_supported())
+               Glib::thread_init();
+
        gtk_set_locale ();
 
 #ifdef VST_SUPPORT
-       /* this does some magic that is needed to make GTK and Wine's own
-          X11 client interact properly.
-       */
-       gui_init (&argc, &argv);
+       /* this does some magic that is needed to make GTK and Wine's own
+          X11 client interact properly.
+       */
+       gui_init (&argc, &argv);
 #endif
 
        (void) bindtextdomain (PACKAGE, localedir);
@@ -380,7 +381,7 @@ int main (int argc, char *argv[])
                cerr << _("Cannot install SIGPIPE error handler") << endl;
        }
 
-        try {
+       try {
                ui = new ARDOUR_UI (&argc, &argv);
        } catch (failed_constructor& err) {
                error << _("could not create ARDOUR GUI") << endmsg;
@@ -392,6 +393,7 @@ int main (int argc, char *argv[])
 
        ARDOUR::cleanup ();
        pthread_cancel_all ();
+
 #ifdef HAVE_LV2
        close_external_ui_windows();
 #endif