summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-10-16 17:12:44 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-10-16 17:12:44 (GMT)
commit17ffb1ea63599ca87e335d4fa71f0c58b14e6b2b (patch)
tree9b63d1b264a61fbfa186e8abd535dd209d9ba612
parentc1e61b7f7a934ceaeb0f98c0104664d1749a86a3 (diff)
downloadblt-17ffb1ea63599ca87e335d4fa71f0c58b14e6b2b.zip
blt-17ffb1ea63599ca87e335d4fa71f0c58b14e6b2b.tar.gz
blt-17ffb1ea63599ca87e335d4fa71f0c58b14e6b2b.tar.bz2
Prefs: add prefs for default display size
-rw-r--r--ds9/doc/release/r7.6.html1
-rw-r--r--ds9/library/layout.tcl6
-rw-r--r--ds9/library/prefs.tcl7
-rw-r--r--ds9/library/prefsdialog.tcl23
4 files changed, 36 insertions, 1 deletions
diff --git a/ds9/doc/release/r7.6.html b/ds9/doc/release/r7.6.html
index 1d54a79..6a36944 100644
--- a/ds9/doc/release/r7.6.html
+++ b/ds9/doc/release/r7.6.html
@@ -146,6 +146,7 @@
<li><tt>09.29.2017 WCS: fixed a problem with use of PC keywords, with CDELT = 1.</tt></li>
<li><tt><b>10.01.2017 RELEASE version 7.6b6</b></tt></li>
<li><tt>10.04.2017 FITSY++: FITS compresssion- fixed a problem with ZNAXIS3=0 keyword issue.</tt></li>
+ <li><tt>10.16.2017 PREFS: Add preferences for default dislay size at startup.</tt></li>
<li><tt><b>xx.xx.2017 RELEASE version 7.6b7</b></tt></li>
</ol>
</ol>
diff --git a/ds9/library/layout.tcl b/ds9/library/layout.tcl
index d6689c3..99408f1 100644
--- a/ds9/library/layout.tcl
+++ b/ds9/library/layout.tcl
@@ -7,6 +7,7 @@ package provide DS9 1.0
proc CanvasDef {} {
global canvas
global icanvas
+ global pcanvas
global ds9
# also adjust info.tcl LayoutInfoPanelHorz
@@ -36,6 +37,11 @@ proc CanvasDef {} {
aqua {set canvas(gap,bottom) 14}
win32 {set canvas(gap,bottom) 0}
}
+
+ set pcanvas(horz,width) $icanvas(horz,width)
+ set pcanvas(horz,height) $icanvas(horz,height)
+ set pcanvas(vert,width) $icanvas(vert,width)
+ set pcanvas(vert,height) $icanvas(vert,height)
}
proc BlinkDef {} {
diff --git a/ds9/library/prefs.tcl b/ds9/library/prefs.tcl
index e86da69..45658b3 100644
--- a/ds9/library/prefs.tcl
+++ b/ds9/library/prefs.tcl
@@ -159,6 +159,13 @@ proc SavePrefs {} {
puts $ch "array set pcurrent \{ [array get pcurrent] \}"
puts $ch {array set current [array get pcurrent]}
+ global canvas
+ global pcanvas
+ puts $ch "global icanvas"
+ puts $ch "global pcanvas"
+ puts $ch "array set pcanvas \{ [array get pcanvas] \}"
+ puts $ch {array set icanvas [array get pcanvas]}
+
global view
global pview
puts $ch "global view"
diff --git a/ds9/library/prefsdialog.tcl b/ds9/library/prefsdialog.tcl
index 4d221c0..75061ac 100644
--- a/ds9/library/prefsdialog.tcl
+++ b/ds9/library/prefsdialog.tcl
@@ -313,5 +313,26 @@ proc PrefsDialogStartup {} {
grid $f.xpa -padx 2 -pady 2 -sticky w
grid $f.samp -padx 2 -pady 2 -sticky w
- pack $f -side top -fill both -expand true -anchor nw
+ set f [ttk::labelframe $w.startup.horz -text \
+ [msgcat::mc {Horizontal Display Size}]]
+ ttk::label $f.twidth -text [msgcat::mc {Width}]
+ ttk::entry $f.width -textvariable pcanvas(horz,width) -width 8
+ ttk::label $f.theight -text [msgcat::mc {Height}]
+ ttk::entry $f.height -textvariable pcanvas(horz,height) -width 8
+
+ grid $f.twidth $f.width -padx 2 -pady 2 -sticky w
+ grid $f.theight $f.height -padx 2 -pady 2 -sticky w
+
+ set f [ttk::labelframe $w.startup.vert -text \
+ [msgcat::mc {Vertical Display Size}]]
+ ttk::label $f.twidth -text [msgcat::mc {Width}]
+ ttk::entry $f.width -textvariable pcanvas(vert,width) -width 8
+ ttk::label $f.theight -text [msgcat::mc {Height}]
+ ttk::entry $f.height -textvariable pcanvas(vert,height) -width 8
+
+ grid $f.twidth $f.width -padx 2 -pady 2 -sticky w
+ grid $f.theight $f.height -padx 2 -pady 2 -sticky w
+
+ pack $w.startup.params $w.startup.horz $w.startup.vert \
+ -side top -fill both -expand true
}