cocoa app file handler
original commit: 4c22197dee2228714d64d79a5312594833df24f4
This commit is contained in:
parent
f8c7790afb
commit
2a3bdeb69b
|
@ -45,7 +45,9 @@
|
|||
(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))])
|
||||
(super-tell #:type _BOOL validateMenuItem: menuItem))]
|
||||
[-a _BOOL (application: [_id theApplication] openFile: [_NSString filename])
|
||||
(queue-file-event (string->path filename))])
|
||||
|
||||
(tellv app finishLaunching)
|
||||
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
|
||||
queue-quit-event
|
||||
queue-prefs-event
|
||||
queue-file-event
|
||||
|
||||
begin-busy-cursor
|
||||
end-busy-cursor
|
||||
|
@ -450,6 +451,12 @@
|
|||
;; called in event-pump thread
|
||||
(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)
|
||||
(let ([e (current-eventspace)])
|
||||
(atomically
|
||||
|
|
Loading…
Reference in New Issue
Block a user