diff --git a/collects/mred/private/wx/cocoa/menu-bar.rkt b/collects/mred/private/wx/cocoa/menu-bar.rkt index c16e81cf..80350fc8 100644 --- a/collects/mred/private/wx/cocoa/menu-bar.rkt +++ b/collects/mred/private/wx/cocoa/menu-bar.rkt @@ -108,7 +108,7 @@ app)) (tellv apple addItem: item) (tellv item release)))]) - (std (format "About ~a" app-name) (selector orderFrontStandardAboutPanel:)) + (std (format "About ~a" app-name) (selector openAbout:) "" #f #t) (std "Preferences..." (selector openPreferences:) "," #f #t) (tellv apple addItem: (tell NSMenuItem separatorItem)) (let ([services (tell (tell NSMenu alloc) initWithTitle: #:type _NSString "Services")]) diff --git a/collects/mred/private/wx/cocoa/queue.rkt b/collects/mred/private/wx/cocoa/queue.rkt index 7e79f607..672c4ffc 100644 --- a/collects/mred/private/wx/cocoa/queue.rkt +++ b/collects/mred/private/wx/cocoa/queue.rkt @@ -56,10 +56,21 @@ (queue-prefs-event) #t] [-a _BOOL (validateMenuItem: [_id menuItem]) - (if (ptr-equal? (selector openPreferences:) - (tell #:type _SEL menuItem action)) - (not (eq? (application-pref-handler) nothing-application-pref-handler)) - (super-tell #:type _BOOL validateMenuItem: menuItem))] + (cond + [(ptr-equal? (selector openPreferences:) + (tell #:type _SEL menuItem action)) + (not (eq? (application-pref-handler) nothing-application-pref-handler))] + [(ptr-equal? (selector openAbout:) + (tell #:type _SEL menuItem action)) + #t] + [else + (super-tell #:type _BOOL validateMenuItem: menuItem)])] + [-a _BOOL (openAbout: [_id sender]) + (if (eq? nothing-application-about-handler + (application-about-handler)) + (tellv app orderFrontStandardAboutPanel: sender) + (queue-about-event)) + #t] [-a _BOOL (application: [_id theApplication] openFile: [_NSString filename]) (queue-file-event (string->path filename))] [-a _BOOL (applicationShouldHandleReopen: [_id app] hasVisibleWindows: [_BOOL has-visible?]) diff --git a/collects/mred/private/wx/common/handlers.rkt b/collects/mred/private/wx/common/handlers.rkt index 3776fd01..b62ea901 100644 --- a/collects/mred/private/wx/common/handlers.rkt +++ b/collects/mred/private/wx/common/handlers.rkt @@ -6,7 +6,8 @@ application-about-handler application-pref-handler - nothing-application-pref-handler)) + nothing-application-pref-handler + nothing-application-about-handler)) (define saved-files null) (define afh (lambda (f) @@ -26,7 +27,8 @@ [(proc) (set! aqh proc)] [() aqh])) -(define aah void) +(define (nothing-application-about-handler) (void)) +(define aah nothing-application-about-handler) (define application-about-handler (case-lambda [(proc) (set! aah proc)] diff --git a/collects/mred/private/wx/common/queue.rkt b/collects/mred/private/wx/common/queue.rkt index 773e3273..f8877854 100644 --- a/collects/mred/private/wx/common/queue.rkt +++ b/collects/mred/private/wx/common/queue.rkt @@ -54,6 +54,7 @@ queue-quit-event queue-prefs-event + queue-about-event queue-file-event begin-busy-cursor @@ -571,6 +572,10 @@ ;; called in event-pump thread (queue-event main-eventspace (application-pref-handler) 'med)) +(define (queue-about-event) + ;; called in event-pump thread + (queue-event main-eventspace (application-about-handler) 'med)) + (define (queue-file-event file) ;; called in event-pump thread (queue-event main-eventspace (lambda ()