summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-08-20 20:55:35 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-08-20 20:55:35 (GMT)
commit5983e484fb3d2ae5f158b476f68c39688ab64654 (patch)
tree3da5a6489e206756fad91433104200bf7ff718c9
parenta13cee632fb94bcda5e8e1ba35b0701938a647fb (diff)
downloadblt-5983e484fb3d2ae5f158b476f68c39688ab64654.zip
blt-5983e484fb3d2ae5f158b476f68c39688ab64654.tar.gz
blt-5983e484fb3d2ae5f158b476f68c39688ab64654.tar.bz2
apple events
-rw-r--r--ds9/library/ds9.tcl47
-rw-r--r--ds9/library/macosx.tcl36
-rw-r--r--ds9/macos/SAOImageDS9.app/Contents/Info.plist4
3 files changed, 23 insertions, 64 deletions
diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl
index d8e98a0..c954045 100644
--- a/ds9/library/ds9.tcl
+++ b/ds9/library/ds9.tcl
@@ -59,9 +59,6 @@ proc DS9Def {} {
set ds9(next,num) 1
set ds9(last) {}
- set ds9(event,opendoc) {}
- set ds9(event,printdoc) {}
-
set ds9(tmpdir) {}
switch $ds9(wm) {
@@ -251,6 +248,10 @@ switch $ds9(wm) {
PrefsDialog
}
+ proc ::tk::mac::OpenApplication {} {
+ Info "open application"
+ }
+
proc ::tk::mac::ReopenApplication {} {
if {[wm state .] eq "withdrawn"} {
wm state . normal
@@ -262,27 +263,31 @@ switch $ds9(wm) {
proc ::tk::mac::OpenDocument {args} {
global ds9
-
- set ds9(event,opendoc) $args
- if {!$ds9(init)} {
- MacOSXOpenDocEvent 1
+ Info "open doc $args"
+ if {$args != {}} {
+ foreach ff $args {
+ MultiLoad
+ LoadFitsFile $ff {} {}
+ FileLast fitsfbox $ff
+ }
+ FinishLoad
}
}
proc ::tk::mac::PrintDocument {args} {
- global ds9
-
- set ds9(event,printdoc) $args
- if {!$ds9(init)} {
- MacOSXPrintDocEvent 0
- }
}
- proc ::tk::mac::Quit {args} {
+ proc ::tk::mac::Quit {} {
QuitDS9
}
- proc ::tk::mac::ShowHelp {args} {
+ proc ::tk::mac::onHide {} {
+ }
+
+ proc ::tk::mac::onShow {} {
+ }
+
+ proc ::tk::mac::ShowHelp {} {
HelpRef
}
}
@@ -556,16 +561,6 @@ ProcessCommandLine
# after command line options to set port/fifo/unix...
catch {IISInit}
-# any os events received?
-switch $ds9(wm) {
- x11 -
- win32 {}
- aqua {
- MacOSXOpenDocEvent 0
- MacOSXPrintDocEvent 1
- }
-}
-
# Load any initalization tcl code
SourceInitFileDir {.ini}
@@ -603,5 +598,3 @@ switch $ds9(wm) {
event generate $ds9(canvas) <Tab> -x 0 -y 0
}
}
-
-
diff --git a/ds9/library/macosx.tcl b/ds9/library/macosx.tcl
index c5bfc26..3098692 100644
--- a/ds9/library/macosx.tcl
+++ b/ds9/library/macosx.tcl
@@ -4,42 +4,6 @@
package provide DS9 1.0
-proc MacOSXOpenDocEvent {fc} {
- global ds9
-
- if {$ds9(event,opendoc) != {}} {
- foreach f $ds9(event,opendoc) {
- MultiLoad
- LoadFitsFile $f {} {}
- FileLast fitsfbox $f
- }
- FinishLoad
- }
-}
-
-proc MacOSXPrintDocEvent {bye} {
- global ds9
-
- if {$ds9(event,printdoc) != {}} {
- set fc 0
-
- foreach f $ds9(event,printdoc) {
- RealizeDS9
-
- MultiLoad
- LoadFitsFile $f {} {}
- FileLast fitsfbox $f
-
- FinishLoad
- PostScript
- }
-
- if {$bye} {
- Quit
- }
- }
-}
-
proc MacOSXGetLocale {} {
return [macosx locale]
}
diff --git a/ds9/macos/SAOImageDS9.app/Contents/Info.plist b/ds9/macos/SAOImageDS9.app/Contents/Info.plist
index 0f2e616..a565be6 100644
--- a/ds9/macos/SAOImageDS9.app/Contents/Info.plist
+++ b/ds9/macos/SAOImageDS9.app/Contents/Info.plist
@@ -57,9 +57,11 @@ Smithsonian Astrophysical Observatory"</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
<key>LSMinimumSystemVersion</key>
- <string>10.9.0</string>
+ <string>10.11.0</string>
<key>LSRequiresCarbon</key>
<true/>
+ <key>NSAppleScriptEnabled</key>
+ <true/>
<key>LSEnvironment</key>
<dict>
<key>PATH</key>