destroy splash when hiding it to workaround odd bug on OS X where the window will...
[ardour.git] / gtk2_ardour / opts.cc
index 1b692f788d2dca15018e9314a5845677540610a1..efb64729fc77abcb831a3c4c3d6a14e396ce7c21 100644 (file)
@@ -34,14 +34,15 @@ using namespace std;
 string ARDOUR_COMMAND_LINE::session_name = "";
 string ARDOUR_COMMAND_LINE::jack_client_name = "ardour";
 bool  ARDOUR_COMMAND_LINE::show_key_actions = false;
-bool ARDOUR_COMMAND_LINE::no_splash = true;
+bool ARDOUR_COMMAND_LINE::no_splash = false;
 bool ARDOUR_COMMAND_LINE::just_version = false;
 bool ARDOUR_COMMAND_LINE::use_vst = true;
 bool ARDOUR_COMMAND_LINE::new_session = false;
 char* ARDOUR_COMMAND_LINE::curvetest_file = 0;
 bool ARDOUR_COMMAND_LINE::try_hw_optimization = true;
+bool ARDOUR_COMMAND_LINE::no_connect_ports = false;
 string ARDOUR_COMMAND_LINE::keybindings_path = ""; /* empty means use builtin default */
-Glib::ustring ARDOUR_COMMAND_LINE::menus_file = "ardour.menus";
+std::string ARDOUR_COMMAND_LINE::menus_file = "ardour.menus";
 bool ARDOUR_COMMAND_LINE::finder_invoked_ardour = false;
 string ARDOUR_COMMAND_LINE::immediate_save;
 string ARDOUR_COMMAND_LINE::jack_session_uuid;
@@ -60,12 +61,12 @@ print_help (const char *execname)
             << _("  -c, --name <name>           Use a specific jack client name, default is ardour\n")
             << _("  -d, --disable-plugins       Disable all plugins in an existing session\n")
             << _("  -D, --debug <options>       Set debug flags. Use \"-D list\" to see available options\n")
-            << _("  -n, --show-splash           Show splash screen\n")
+            << _("  -n, --no-splash             Do not show splash screen\n")
             << _("  -m, --menus file            Use \"file\" to define menus\n")
             << _("  -N, --new session-name      Create a new session from the command line\n")
             << _("  -O, --no-hw-optimizations   Disable h/w specific optimizations\n")
             << _("  -S, --sync                  Draw the gui synchronously \n")
-#ifdef VST_SUPPORT
+#ifdef WINDOWS_VST_SUPPORT
             << _("  -V, --novst                 Do not use VST support\n")
 #endif
             << _("  -E, --save <file>           Load the specified session, save it to <file> and then quit\n")
@@ -79,7 +80,7 @@ print_help (const char *execname)
 int
 ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
 {
-       const char *optstring = "bc:C:dD:hk:E:m:N:nOp:ST:U:vV";
+       const char *optstring = "bc:C:dD:hk:E:m:N:nOp:PST:U:vV";
        const char *execname = strrchr (argv[0], '/');
 
        if (getenv ("ARDOUR_SAE")) {
@@ -109,6 +110,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
                { "save", 1, 0, 'E' },
                { "uuid", 1, 0, 'U' },
                { "template", 1, 0, 'T' },
+               { "no-connect-ports", 0, 0, 'P' },
                { 0, 0, 0, 0 }
        };
 
@@ -147,13 +149,13 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
                                exit (0);
                        }
                        break;
-                       
+
                case 'm':
                        menus_file = optarg;
                        break;
 
                case 'n':
-                       no_splash = false;
+                       no_splash = true;
                        break;
 
                case 'p':
@@ -177,10 +179,14 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
                        try_hw_optimization = false;
                        break;
 
+               case 'P':
+                       no_connect_ports = true;
+                       break;
+
                case 'V':
-#ifdef VST_SUPPORT
+#ifdef WINDOWS_VST_SUPPORT
                        use_vst = false;
-#endif /* VST_SUPPORT */
+#endif /* WINDOWS_VST_SUPPORT */
                        break;
 
                case 'c':