diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2018-01-12 18:46:55 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2018-01-12 18:46:55 (GMT) |
commit | af56db7f8599b9604e1191927005967437091ebc (patch) | |
tree | d29b157ee171eaaaee941070e69c06110f84f7e0 /ds9/library/prefsdialog.tcl | |
parent | 45c278121e1a405c49b9d1c8447b06628b76a673 (diff) | |
download | blt-af56db7f8599b9604e1191927005967437091ebc.zip blt-af56db7f8599b9604e1191927005967437091ebc.tar.gz blt-af56db7f8599b9604e1191927005967437091ebc.tar.bz2 |
add precision command
Diffstat (limited to 'ds9/library/prefsdialog.tcl')
-rw-r--r-- | ds9/library/prefsdialog.tcl | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/ds9/library/prefsdialog.tcl b/ds9/library/prefsdialog.tcl index cdc02e7..fa36c64 100644 --- a/ds9/library/prefsdialog.tcl +++ b/ds9/library/prefsdialog.tcl @@ -53,6 +53,7 @@ proc PrefsDialog {{which {}}} { set dprefs(tabs) {} PrefsDialogGeneral + PrefsDialogPrecision PrefsDialogStartup PrefsDialogMenu PrefsDialogPanner @@ -295,6 +296,54 @@ proc PrefsDialogGeneral {} { -side top -fill both -expand true } +proc PrefsDialogPrecision {} { + global dprefs + global ds9 + global pds9 + + set w $dprefs(tab) + + $dprefs(list) insert end [msgcat::mc {Precision}] + lappend dprefs(tabs) [ttk::frame $w.precision] + + # Coordinates + set f [ttk::labelframe $w.precision.coord -text [msgcat::mc {Coordinates}]] + + ttk::label $f.tlinear -text [msgcat::mc {Linear}] + ttk::entry $f.linear -textvariable pds9(prec,linear) \ + -validate focusout -validatecommand PrefsPrecision -width 8 + ttk::label $f.tdeg -text [msgcat::mc {Degrees}] + ttk::entry $f.deg -textvariable pds9(prec,deg) \ + -validate focusout -validatecommand PrefsPrecision -width 8 + ttk::label $f.thms -text [msgcat::mc {HMS}] + ttk::entry $f.hms -textvariable pds9(prec,hms) \ + -validate focusout -validatecommand PrefsPrecision -width 8 + ttk::label $f.tdms -text [msgcat::mc {DMS}] + ttk::entry $f.dms -textvariable pds9(prec,dms) \ + -validate focusout -validatecommand PrefsPrecision -width 8 + + grid $f.tlinear $f.linear -padx 2 -pady 2 -sticky w + grid $f.tdeg $f.deg -padx 2 -pady 2 -sticky w + grid $f.thms $f.hms -padx 2 -pady 2 -sticky w + grid $f.tdms $f.dms -padx 2 -pady 2 -sticky w + + # Length + set f [ttk::labelframe $w.precision.length -text [msgcat::mc {Length}]] + + ttk::label $f.tarcmin -text [msgcat::mc {ArcMin}] + ttk::entry $f.arcmin -textvariable pds9(prec,arcmin) \ + -validate focusout -validatecommand PrefsPrecision -width 8 + ttk::label $f.tarcsec -text [msgcat::mc {ArcSec}] + ttk::entry $f.arcsec -textvariable pds9(prec,arcsec) \ + -validate focusout -validatecommand PrefsPrecision -width 8 + + grid $f.tarcmin $f.arcmin -padx 2 -pady 2 -sticky w + grid $f.tarcsec $f.arcsec -padx 2 -pady 2 -sticky w + + pack $w.precision.coord $w.precision.length \ + -side top -fill both -expand true +} + proc PrefsDialogStartup {} { global dprefs |