diff options
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]} { |