Changeset 44
- Timestamp:
- Dec 4, 2009 4:59:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lstview
- Property rcs:date changed from 1998/11/23 19:38:02 to 1999/01/21 22:42:08
- Property rcs:lines changed from +5 -4 to +46 -7
- Property rcs:rev changed from 1.3 to 1.4
r7 r44 29 29 set box {} 30 30 set txtvw(followcycle) 1 31 # override options with locally defined values32 if [file exists ~/.lstview_config] {33 source ~/.lstview_config34 }35 31 36 32 proc waitmsg {message} { … … 199 195 } 200 196 201 202 197 proc findsetstring {win string {menu ""} {pos 0.0}} { 203 198 global txtvw … … 294 289 } 295 290 291 proc SaveOptions {} { 292 global txtvw 293 set fp [open [file join ~ .gsas_config] a] 294 puts $fp "set txtvw(followcycle) $txtvw(followcycle)" 295 close $fp 296 } 297 296 298 proc aboutgsas {} { 297 299 global Revision … … 302 304 $Revision\n\ 303 305 " {} 0 OK 306 } 307 308 #---------------------------------------------------------------- 309 # where are we? 310 set expgui(script) [info script] 311 # translate links -- go six levels deep 312 foreach i {1 2 3 4 5 6} { 313 if {[file type $expgui(script)] == "link"} { 314 set link [file readlink $expgui(script)] 315 if { [file pathtype $link] == "absolute" } { 316 h set expgui(script) $link 317 } { 318 set expgui(script) [file dirname $expgui(script)]/$link 319 } 320 } else { 321 break 322 } 323 } 324 325 # fixup relative paths 326 if {[file pathtype $expgui(script)] == "relative"} { 327 set expgui(script) [file join [pwd] $expgui(script)] 328 } 329 set expgui(scriptdir) [file dirname $expgui(script) ] 330 # override options with locally defined values 331 if [file exists [file join $expgui(scriptdir) localconfig]] { 332 source [file join $expgui(scriptdir) localconfig] 333 } 334 if [file exists [file join ~ .gsas_config]] { 335 source [file join ~ .gsas_config] 304 336 } 305 337 … … 330 362 -side left 331 363 menu .a.goto.menu 332 .a.goto.menu add checkbutton -label "Auto Advance" -variable txtvw(followcycle)333 364 .a.goto.menu add cascade -label "Cycle #" -menu .a.goto.menu.cyc \ 334 365 -state disabled … … 344 375 .a.goto.menu add cascade -label "" -menu .a.goto.menu.str -state disabled 345 376 menu .a.goto.menu.str 377 378 pack [menubutton .a.options -text "Options" -underline 0 \ 379 -menu .a.options.menu] \ 380 -side left 381 menu .a.options.menu 382 .a.options.menu add checkbutton -label "Auto Advance" -variable txtvw(followcycle) 383 .a.options.menu add command -label "Save Options" -underline 1 \ 384 -command "SaveOptions" 346 385 347 386 if {$plotvars && ![catch {package require BLT}]} {
Note: See TracChangeset
for help on using the changeset viewer.