ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/do_file.tcl
(Generate patch)

Comparing ray/src/util/do_file.tcl (file contents):
Revision 2.1 by greg, Thu Oct 27 15:56:06 1994 UTC vs.
Revision 2.5 by greg, Thu Dec 8 17:16:38 1994 UTC

# Line 148 | Line 148 | proc load_vars {f {vl all}} {  # load RIF variables
148          }
149          if {"$vl" == "all" && ! [chksave]} {return 0}
150          set curmess {Please wait...}
151 <        update idletasks
151 >        update
152          if [catch {exec rad -n -w -e $f >& /usr/tmp/ro[pid]}] {
153                  set curmess [exec cat /usr/tmp/ro[pid]]
154                  exec rm -f /usr/tmp/ro[pid]
# Line 242 | Line 242 | proc newsave f {               # save a RIF
242                          return 0
243                  }
244          }
245 +        if {! [file writable $f] && [catch {exec chmod u+w $f} curmess]} {
246 +                beep
247 +                return 0
248 +        }
249          if [save_vars $f] {
250                  set rifname [pwd]/$f
251                  set readonly 0
# Line 273 | Line 277 | proc newnew f {                        # create a new RIF
277   proc do_file w {
278          global rifname readonly rif_glob curfile curpat
279          if {"$w" == "done"} {
280 +                cd [file dirname $rifname]
281                  set rif_glob $curpat
282                  return
283          }
# Line 281 | Line 286 | proc do_file w {
286          pack $w.left -side left
287          button $w.left.load -text LOAD -width 5 \
288                          -relief raised -command {newload $curfile}
289 <        button $w.left.save -text SAVE -width 5 \
290 <                        -relief raised -command {newsave $curfile}
289 >        button $w.left.save -text SAVE -width 5 -relief raised \
290 >                        -command "newsave \$curfile; update_dir $w.right"
291          button $w.left.new -text NEW -width 5 \
292                          -relief raised -command {newnew $curfile}
293          pack $w.left.load $w.left.save $w.left.new -side top -pady 15 -padx 20

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines