summaryrefslogtreecommitdiffstats
path: root/ds9
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-07-17 17:21:30 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-07-17 17:21:30 (GMT)
commit3d4d7bc4f7f5c9d74e08d448130e10a7671484a6 (patch)
tree2be30b64313aefb88759e1686a73dc0f7850af3c /ds9
parent4a7f049c9866df97c1dbe19b9ec16443abdb3143 (diff)
parenteac7ed48f3d0c46d3510251bb7243e9d958da540 (diff)
downloadblt-3d4d7bc4f7f5c9d74e08d448130e10a7671484a6.zip
blt-3d4d7bc4f7f5c9d74e08d448130e10a7671484a6.tar.gz
blt-3d4d7bc4f7f5c9d74e08d448130e10a7671484a6.tar.bz2
Merge branch 'master' into devel
Diffstat (limited to 'ds9')
-rw-r--r--ds9/library/ds9.tcl69
1 files changed, 34 insertions, 35 deletions
diff --git a/ds9/library/ds9.tcl b/ds9/library/ds9.tcl
index db15813..00c50b3 100644
--- a/ds9/library/ds9.tcl
+++ b/ds9/library/ds9.tcl
@@ -401,6 +401,38 @@ wm title $ds9(top) "SAOImage $ds9(title)"
wm iconname $ds9(top) "SAOImage $ds9(title)"
wm protocol $ds9(top) WM_DELETE_WINDOW QuitDS9
+# set the visual
+set ds9(visual) [winfo visual .]
+set ds9(depth) [winfo depth .]
+
+switch $ds9(wm) {
+ x11 {
+ if {$ds9(depth)==15} {
+ set ds9(depth) 16
+ }
+ if {$ds9(depth)==32} {
+ set ds9(depth) 24
+ }
+ }
+ aqua {
+ if {$ds9(depth)==15} {
+ set ds9(depth) 16
+ }
+ }
+ win32 {
+ if {$ds9(depth)==32} {
+ set ds9(depth) 24
+ }
+ }
+}
+
+switch -- $ds9(visual)$ds9(depth) {
+ truecolor8 {}
+ truecolor16 {}
+ truecolor24 {}
+ default {BadVisualError}
+}
+
# Init Temporary Dir before prefs
InitTempDir
@@ -419,7 +451,7 @@ if {$ds9(prefs)} {
SetDefaultFont false
SetDefaultTextFont false
-# we need to set certain variables such as color, title, language
+# we need to set certain variables such as debug, title, language, xpa
ProcessCommandLineSecond
# initialize language
@@ -449,38 +481,6 @@ switch $pds9(language) {
default {SetLanguage $pds9(language)}
}
-# set the visual
-set ds9(visual) [winfo visual .]
-set ds9(depth) [winfo depth .]
-
-switch $ds9(wm) {
- x11 {
- if {$ds9(depth)==15} {
- set ds9(depth) 16
- }
- if {$ds9(depth)==32} {
- set ds9(depth) 24
- }
- }
- aqua {
- if {$ds9(depth)==15} {
- set ds9(depth) 16
- }
- }
- win32 {
- if {$ds9(depth)==32} {
- set ds9(depth) 24
- }
- }
-}
-
-switch -- $ds9(visual)$ds9(depth) {
- truecolor8 {}
- truecolor16 {}
- truecolor24 {}
- default {BadVisualError}
-}
-
# create our main frame
set ds9(main) [ttk::frame ${ds9(top)}ds9]
pack $ds9(main) -fill both -expand true
@@ -488,8 +488,7 @@ pack $ds9(main) -fill both -expand true
# Create image canvas
CreateCanvas
-# Create Colorbar-- Create this first, so in case of a private colormap,
-# gui colors will be allocated in the new colormap, not the default colormap
+# Create Colorbar
CreateColorbar
# Create other parts of the display