When inserting new notes with the pencil tool, make them the length of the grid subvi...
[ardour.git] / gtk2_ardour / cocoacarbon.mm
index 75df4811863b6770c519c4a501c353637e08661a..84e34bd74d82c1b830c185c42cd0e253fe5c7128 100644 (file)
 #undef YES   // stupid, stupid gtkmm and/or NSObjC
 #undef NO    // ditto
 
+#ifdef GTKOSX
+#include <objc/objc.h>
+#ifdef nil
+       /*Stupid OS X defining nil*/
+#undef nil
+#endif
+#endif
+
 #include "ardour_ui.h"
 #include "actions.h"
 #include "opts.h"
@@ -163,3 +171,16 @@ ARDOUR_UI::platform_setup ()
        } 
 }
 
+bool
+cocoa_open_url (const char* uri)
+{
+       NSString* struri = [[NSString alloc] initWithUTF8String:uri];
+       NSURL* nsurl = [[NSURL alloc] initWithString:struri];
+
+       bool ret = [[NSWorkspace sharedWorkspace] openURL:nsurl];
+
+       [struri release];
+       [nsurl release];
+
+       return ret;
+}