Remove internal edit mode and add "content" tool.
[ardour.git] / gtk2_ardour / main.cc
index 307325a1526bc82cbc5165be5c62cc926a9a662a..b4f5a36521d49dd138f7f36db0bfb77d5b44b52d 100644 (file)
@@ -49,7 +49,6 @@
 #include <gtkmm2ext/utils.h>
 
 #include "version.h"
-#include "utils.h"
 #include "ardour_ui.h"
 #include "opts.h"
 #include "enums.h"
 
 #include "i18n.h"
 
+#ifdef PLATFORM_WINDOWS
+#include <fcntl.h> // Needed for '_fmode'
+#endif
+
+#ifdef WAF_BUILD
+#include "gtk2ardour-version.h"
+#endif
 
 using namespace std;
 using namespace Gtk;
@@ -123,6 +129,7 @@ Click OK to exit %1."), PROGRAM_NAME, AudioEngine::instance()->current_backend_n
        return false; /* do not call again */
 }
 
+#ifndef PLATFORM_WINDOWS
 static void
 sigpipe_handler (int /*signal*/)
 {
@@ -137,6 +144,7 @@ sigpipe_handler (int /*signal*/)
                done_the_backend_thing =  true;
        }
 }
+#endif
 
 #if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
 /*
@@ -173,7 +181,7 @@ int main (int argc, char *argv[])
        gtk_set_locale ();
 #endif
 
-#ifdef WINDOWS_VST_SUPPORT
+#if (defined WINDOWS_VST_SUPPORT && !defined PLATFORM_WINDOWS)
        /* this does some magic that is needed to make GTK and X11 client interact properly.
         * the platform dependent code is in windows_vst_plugin_ui.cc
         */
@@ -207,6 +215,16 @@ int main (int argc, char *argv[])
 #endif
 
        if (parse_opts (argc, argv)) {
+#if (defined(COMPILER_MSVC) && defined(NDEBUG) && !defined(RDC_BUILD))
+        // Since we don't ordinarily have access to stdout and stderr with
+        // an MSVC app, let the user know we encountered a parsing error.
+        Gtk::Main app(&argc, &argv); // Calls 'gtk_init()'
+
+        Gtk::MessageDialog dlgReportParseError (_("\n   Ardour could not understand your command line      "),
+                                                      false, MESSAGE_ERROR, BUTTONS_CLOSE, true);
+        dlgReportParseError.set_title (_("An error was encountered while launching Ardour"));
+               dlgReportParseError.run ();
+#endif
                exit (1);
        }