add to LUA API (new Stripable API)
[ardour.git] / libs / gtkmm2ext / gtkapplication_quartz.mm
index 932eaa71c9fa6770f96722f8a717fbbe704c025e..c845db90b71d5b96d40adb94c51ce4859b53a080 100644 (file)
@@ -573,7 +573,9 @@ idle_call_activate (gpointer data)
 - (void) activate:(id) sender
 {
        UNUSED_PARAMETER(sender);
-       g_idle_add (idle_call_activate, gtk_menu_item);
+    // Hot Fix. Increase Priority.
+       g_idle_add_full (G_PRIORITY_HIGH_IDLE, idle_call_activate, gtk_menu_item, NULL);
+//    g_idle_add (idle_call_activate, gtk_menu_item);
 }
 @end
 
@@ -876,9 +878,9 @@ cocoa_menu_item_update_accelerator (NSMenuItem *cocoa_item,
                                        modifiers |= NSControlKeyMask;
                                }
                                
-                               /* gdk/quartz maps Command to Meta (XXX check this - it may move to SUPER at some point) */
+                               /* our modified gdk/quartz maps Command to Mod2 */
                                
-                               if (key->accel_mods & GDK_META_MASK) {
+                               if (key->accel_mods & GDK_MOD2_MASK) {
                                        modifiers |= NSCommandKeyMask;
                                }
                        }  
@@ -1221,7 +1223,7 @@ create_apple_menu ()
        [menuitem release];
        [_app_menu addItem: [NSMenuItem separatorItem]];
        menuitem = [[NSMenuItem alloc] initWithTitle:@"Hide"
-                   action:@selector(hide:) keyEquivalent:@""];
+                   action:@selector(hide:) keyEquivalent:@"h"];
        [menuitem setTarget: NSApp];
        [_app_menu addItem: menuitem];
        [menuitem release];
@@ -1424,9 +1426,10 @@ namespace Gtk {
 
 @end
 
-@interface GtkApplicationDelegate : NSObject 
+@interface GtkApplicationDelegate : NSObject
 -(BOOL) application:(NSApplication*) app openFile:(NSString*) file;
 - (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *) app;
+- (void) startApp;
 @end
 
 @implementation GtkApplicationDelegate
@@ -1475,6 +1478,12 @@ gtk_application_ready ()
         [[NSApplication sharedApplication] activateIgnoringOtherApps : YES];
 }
 
+extern "C" void
+gtk_application_hide ()
+{
+    [NSApp performSelector:@selector(hide:)];
+}
+
 extern "C" void
 gtk_application_cleanup()
 {