From 75f55b5af8cd60b075cc167da261e057f7f5b6f3 Mon Sep 17 00:00:00 2001 From: William Joye Date: Wed, 19 Jun 2019 16:53:43 -0400 Subject: PREFS: screen for old pbuttons vars which may have been passed along from previous prefs files before processing the buttons --- ds9/doc/release/r8.1.html | 1 + ds9/library/prefs.tcl | 82 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 77 insertions(+), 6 deletions(-) diff --git a/ds9/doc/release/r8.1.html b/ds9/doc/release/r8.1.html index 28f5806..95e7bff 100644 --- a/ds9/doc/release/r8.1.html +++ b/ds9/doc/release/r8.1.html @@ -83,6 +83,7 @@
  • 06.04.2019 COLORBAR: fixed a number of issues with updating the screen with color tags active.
  • 06.05.2019 GUI: colobar cmds load/save errors now report via Error proc.
  • 06.19.2019 RGB: fixed an issue introduced in 8.1b1 in which a bad fits file loaded into RGB frame would not generate an error message.
  • +
  • 06.19.2019 PREFS: screen for old pbuttons vars which may have been passed along from previous prefs files before processing the buttons.
  • xx.xx.2019 RELEASE version 8.1b2
  • diff --git a/ds9/library/prefs.tcl b/ds9/library/prefs.tcl index fe6283d..17a83c2 100644 --- a/ds9/library/prefs.tcl +++ b/ds9/library/prefs.tcl @@ -452,6 +452,10 @@ proc FixPrefs {version} { set version 5.x } + # these old vars may exists in the wild + # be sure to rm them + FixPrefsVarOld + switch $version { 5.x { FixPrefs5.xto6.0 @@ -464,6 +468,8 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 6.0 { FixPrefs6.0to6.1 @@ -475,6 +481,8 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 6.1 - 6.1.1 - @@ -487,6 +495,8 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 6.2 { FixPrefs6.2to7.0 @@ -496,6 +506,8 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 7.0 { FixPrefs7.0to7.1 @@ -504,6 +516,8 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 7.1 { FixPrefs7.1to7.2 @@ -511,12 +525,16 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 7.2 { FixPrefs7.2to7.3 FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 7.3 - 7.3.1 - @@ -524,23 +542,71 @@ proc FixPrefs {version} { FixPrefs7.3to7.4 FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 7.4 { FixPrefs7.4to7.5 FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 } 7.5 { FixPrefs7.5to7.6 + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 + } + 7.6 { + FixPrefs7.6to8.0 + FixPrefs8.0to8.1 + } + 8.0 { + FixPrefs8.0to8.1 } - 7.6 {} + 8.1 {} } } +proc FixPrefsVarOld {} { + # these old vars may exists in the wild + # be sure to rm them + FixVarRm pbuttons(bin,match) + FixVarRm pbuttons(scale,match) + FixVarRm pbuttons(color,match) + + # 5.7 + FixVarRm pbuttons(help,issue) + + # 6.2 + FixVarRm pbuttons(file,savefits) + FixVarRm pbuttons(file,savempeg) + FixVarRm pbuttons(region,circle3d) + + # 7.0 + FixVarRm pbuttons(file,about) + FixVarRm pbuttons(help,home) + + # 7.5 + FixVarRm pbuttons(help,keyboard) + + # 8.0 + FixVarRm pbuttons(file,samp) +} + +proc FixPrefs8.0to8.1 {} { + FixVarRm pbuttons(file,samp) +} + +proc FixPrefs7.6to8.0 {} { +} + proc FixPrefs7.5to7.6 {} { global smooth set smooth(radius,minor) $smooth(radius) set smooth(sigma) [expr int($smooth(radius)/2.)] set smooth(sigma,minor) $smooth(sigma) + + FixVarRm pbuttons(help,keyboard) } proc FixPrefs7.4to7.5 {} { @@ -649,6 +715,9 @@ proc FixPrefs7.0to7.1 {} { unset pap(grid) unset pap(grid,log) } + + FixVarRm pbuttons(file,about) + FixVarRm pbuttons(help,home) } proc FixPrefs6.2to7.0 {} { @@ -677,19 +746,20 @@ proc FixPrefs6.2to7.0 {} { FixVar pbuttons(frame,match,scale) pbuttons(frame,matchscale) FixVar pbuttons(frame,match,color) pbuttons(frame,matchcolor) - FixVarRm pbuttons(region,circle3d) - FixVar ppanner(compass) ppanner(compass,image) FixVarRm ppanner(compass,wcs,system) FixVarRm ppanner(compass,wcs,sky) - global pmarker FixVarRm pmarker(dialog,system) FixVarRm pmarker(dialog,sky) FixVarRm pmarker(dialog,skyformat) FixVarRm pmarker(dialog,dist,system) FixVarRm pmarker(dialog,dist,format) + FixVarRm pbuttons(file,savefits) + FixVarRm pbuttons(file,savempeg) + FixVarRm pbuttons(region,circle3d) + # mousewheel MacOSX Lion global tcl_platform global ppanzoom @@ -814,8 +884,6 @@ proc FixPrefs6.0to6.1 {} { FixVarSet pgraph(horz,log) graph(horz,log) FixVarSet pgraph(vert,grid) graph(vert,grid) FixVarSet pgraph(vert,log) graph(vert,log) -# global graph -# catch {unset graph} # cat FixVar pcat(server) cat(server) @@ -1055,5 +1123,7 @@ proc FixPrefs5.xto6.0 {} { FixVarRm pbuttons(zoom,1/8) FixVarRm pbuttons(zoom,1/4) FixVarRm pbuttons(zoom,1/2) + + FixVarRm pbuttons(help,issue) } } -- cgit v0.12