diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-08-21 20:40:02 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-08-21 20:40:02 (GMT) |
commit | 7959c11e46b7f1227edce9ea4d6de29a786d88bb (patch) | |
tree | 3ab40f0bce571c365d4c59528522d1cfad282bfb /ds9/library/mfile.tcl | |
parent | 86dd0bbcc0ea3a68eee464557e1de53def0192d9 (diff) | |
download | blt-7959c11e46b7f1227edce9ea4d6de29a786d88bb.zip blt-7959c11e46b7f1227edce9ea4d6de29a786d88bb.tar.gz blt-7959c11e46b7f1227edce9ea4d6de29a786d88bb.tar.bz2 |
clean up code
Diffstat (limited to 'ds9/library/mfile.tcl')
-rw-r--r-- | ds9/library/mfile.tcl | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/ds9/library/mfile.tcl b/ds9/library/mfile.tcl index 2c931de..5da8cc6 100644 --- a/ds9/library/mfile.tcl +++ b/ds9/library/mfile.tcl @@ -487,48 +487,39 @@ proc PrefsDialogButtonbarFile {f} { # Support -proc UpdateFileMenuStatic {} { +proc UpdateFileMenu {} { global ds9 + global current + global samp + global xpa global debug if {$debug(tcl,update)} { - puts stderr "UpdateFileMenuStatic" + puts stderr "UpdateFileMenu" } + set mm $ds9(mb).file + set bb $ds9(buttons).file + if {$ds9(active,num) > 0} { - $ds9(mb).file entryconfig "[msgcat::mc {Open}]..." \ + $mm entryconfig "[msgcat::mc {Open}]..." \ -state normal - $ds9(mb).file entryconfig [msgcat::mc {Open as}] \ + $mm entryconfig [msgcat::mc {Open as}] \ -state normal - $ds9(mb).file entryconfig [msgcat::mc {Import}] \ + $mm entryconfig [msgcat::mc {Import}] \ -state normal - $ds9(buttons).file.open configure -state normal + $bb.open configure -state normal } else { - $ds9(mb).file entryconfig "[msgcat::mc {Open}]..." \ + $mm entryconfig "[msgcat::mc {Open}]..." \ -state disabled - $ds9(mb).file entryconfig [msgcat::mc {Open as}] \ + $mm entryconfig [msgcat::mc {Open as}] \ -state disabled - $ds9(mb).file entryconfig [msgcat::mc {Import}] \ + $mm entryconfig [msgcat::mc {Import}] \ -state disabled - $ds9(buttons).file.open configure -state disabled + $bb.open configure -state disabled } -} - -proc UpdateFileMenu {} { - global ds9 - global current - global samp - global xpa - - global debug - if {$debug(tcl,update)} { - puts stderr "UpdateFileMenu" - } - - set mm $ds9(mb).file - set bb $ds9(buttons).file if {$current(frame) != {}} { if {[$current(frame) has fits]} { |