19 |
|
set n 1 |
20 |
|
foreach v $oldval { |
21 |
|
if {"[string index $v 0]" == "-"} { |
22 |
< |
lappend radvar(view) "$n $v" |
22 |
> |
lappend radvar(view) "u$n $v" |
23 |
|
} elseif {[lsearch -glob $radvar(view) \ |
24 |
|
"[lindex $v 0] *"] >= 0} { |
25 |
|
continue |
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] |
167 |
|
set curmess {Project loaded.} |
168 |
|
} else { |
169 |
|
foreach n $vl { |
170 |
< |
set radvar($n) {} |
170 |
> |
catch {unset radvar($n)} |
171 |
|
} |
172 |
|
while {[gets $fi curli] != -1} { |
173 |
|
if [regexp {^[a-zA-Z][a-zA-Z0-9]* *=} $curli] { |
242 |
|
return 0 |
243 |
|
} |
244 |
|
} |
245 |
+ |
if {[file exists $f] && ! [file writable $f] && |
246 |
+ |
[catch {exec chmod u+w $f} curmess]} { |
247 |
+ |
beep |
248 |
+ |
return 0 |
249 |
+ |
} |
250 |
|
if [save_vars $f] { |
251 |
|
set rifname [pwd]/$f |
252 |
|
set readonly 0 |
278 |
|
proc do_file w { |
279 |
|
global rifname readonly rif_glob curfile curpat |
280 |
|
if {"$w" == "done"} { |
281 |
+ |
cd [file dirname $rifname] |
282 |
|
set rif_glob $curpat |
283 |
|
return |
284 |
|
} |
287 |
|
pack $w.left -side left |
288 |
|
button $w.left.load -text LOAD -width 5 \ |
289 |
|
-relief raised -command {newload $curfile} |
290 |
< |
button $w.left.save -text SAVE -width 5 \ |
291 |
< |
-relief raised -command {newsave $curfile} |
290 |
> |
button $w.left.save -text SAVE -width 5 -relief raised \ |
291 |
> |
-command "newsave \$curfile; update_dir $w.right" |
292 |
|
button $w.left.new -text NEW -width 5 \ |
293 |
|
-relief raised -command {newnew $curfile} |
294 |
|
pack $w.left.load $w.left.save $w.left.new -side top -pady 15 -padx 20 |