cocoa app file handler
This commit is contained in:
parent
83a00c66ec
commit
4c22197dee
|
@ -45,7 +45,9 @@
|
||||||
(if (ptr-equal? (selector openPreferences:)
|
(if (ptr-equal? (selector openPreferences:)
|
||||||
(tell #:type _SEL menuItem action))
|
(tell #:type _SEL menuItem action))
|
||||||
(not (eq? (application-pref-handler) nothing-application-pref-handler))
|
(not (eq? (application-pref-handler) nothing-application-pref-handler))
|
||||||
(super-tell #:type _BOOL validateMenuItem: menuItem))])
|
(super-tell #:type _BOOL validateMenuItem: menuItem))]
|
||||||
|
[-a _BOOL (application: [_id theApplication] openFile: [_NSString filename])
|
||||||
|
(queue-file-event (string->path filename))])
|
||||||
|
|
||||||
(tellv app finishLaunching)
|
(tellv app finishLaunching)
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
|
|
||||||
queue-quit-event
|
queue-quit-event
|
||||||
queue-prefs-event
|
queue-prefs-event
|
||||||
|
queue-file-event
|
||||||
|
|
||||||
begin-busy-cursor
|
begin-busy-cursor
|
||||||
end-busy-cursor
|
end-busy-cursor
|
||||||
|
@ -450,6 +451,12 @@
|
||||||
;; called in event-pump thread
|
;; called in event-pump thread
|
||||||
(queue-event main-eventspace (application-pref-handler) 'med))
|
(queue-event main-eventspace (application-pref-handler) 'med))
|
||||||
|
|
||||||
|
(define (queue-file-event file)
|
||||||
|
;; called in event-pump thread
|
||||||
|
(queue-event main-eventspace (lambda ()
|
||||||
|
((application-file-handler) file))
|
||||||
|
'med))
|
||||||
|
|
||||||
(define (begin-busy-cursor)
|
(define (begin-busy-cursor)
|
||||||
(let ([e (current-eventspace)])
|
(let ([e (current-eventspace)])
|
||||||
(atomically
|
(atomically
|
||||||
|
|
Loading…
Reference in New Issue
Block a user