| 46 | 
  | 
                        2 { return 0 } | 
| 47 | 
  | 
                } | 
| 48 | 
  | 
                if $readonly { | 
| 49 | 
– | 
                        .file invoke | 
| 49 | 
  | 
                        set curmess {Rename file or uncheck read-only to save.} | 
| 50 | 
+ | 
                        .file invoke | 
| 51 | 
  | 
                        return 0 | 
| 52 | 
< | 
                } else { | 
| 53 | 
< | 
                        catch {unset oldradvar} | 
| 54 | 
< | 
                        save_vars $rifname | 
| 55 | 
< | 
                } | 
| 52 | 
> | 
                } elseif {[save_vars $rifname]} { | 
| 53 | 
> | 
                        gotfile 1 | 
| 54 | 
> | 
                        return 1 | 
| 55 | 
> | 
                } else { return 0 } | 
| 56 | 
  | 
        } else { return 1 } | 
| 57 | 
  | 
} | 
| 58 | 
  | 
 | 
| 75 | 
  | 
 | 
| 76 | 
  | 
set smallscrn [expr [winfo screenwidth .] < 830] | 
| 77 | 
  | 
 | 
| 78 | 
+ | 
message .mess -relief ridge -font fixed -textvariable curmess -anchor nw | 
| 79 | 
  | 
if $smallscrn { | 
| 80 | 
  | 
        frame .upper -geometry 640x410 | 
| 81 | 
  | 
        frame .upper.right -geometry 120x410 | 
| 82 | 
+ | 
        .mess configure -width 640 | 
| 83 | 
  | 
} else { | 
| 84 | 
  | 
        frame .upper -geometry 830x410 | 
| 85 | 
  | 
        frame .upper.right -geometry 130x410 | 
| 86 | 
+ | 
        .mess configure -width 830 | 
| 87 | 
  | 
} | 
| 88 | 
  | 
pack .upper -side top | 
| 89 | 
  | 
place .upper.right -relx .98 -rely 0 -anchor ne | 
| 87 | 
– | 
message .mess -relief ridge -font fixed -textvariable curmess \ | 
| 88 | 
– | 
                -anchor nw -width 620 | 
| 90 | 
  | 
pack .mess -side top -expand yes -fill both | 
| 91 | 
  | 
helplink .mess trad trad messages | 
| 92 | 
+ | 
. configure -cursor top_left_arrow | 
| 93 | 
  | 
 | 
| 94 | 
  | 
# Make mode buttons | 
| 95 | 
  | 
 | 
| 142 | 
  | 
 | 
| 143 | 
  | 
if $smallscrn { | 
| 144 | 
  | 
        wm minsize . 640 460 | 
| 145 | 
+ | 
        wm maxsize . 640 512 | 
| 146 | 
  | 
} else { | 
| 147 | 
  | 
        wm minsize . 830 460 | 
| 148 | 
+ | 
        wm maxsize . 830 512 | 
| 149 | 
  | 
} | 
| 150 | 
  | 
wm iconbitmap . @$radlib/trad.icon | 
| 151 | 
  | 
 | 
| 159 | 
  | 
                } | 
| 160 | 
  | 
        } else { | 
| 161 | 
  | 
                set mode disabled | 
| 162 | 
+ | 
                .file invoke | 
| 163 | 
  | 
        } | 
| 164 | 
  | 
        foreach b {scene zone views options action results} { | 
| 165 | 
  | 
                .$b configure -state $mode | 
| 169 | 
  | 
# Decide where to go and start | 
| 170 | 
  | 
 | 
| 171 | 
  | 
if {[llength $argv] == 0} { | 
| 167 | 
– | 
        gotfile 0 | 
| 172 | 
  | 
        set curmess "Choose a Radiance project file." | 
| 173 | 
< | 
        .file invoke | 
| 173 | 
> | 
        gotfile 0 | 
| 174 | 
  | 
} elseif {[llength $argv] == 1} { | 
| 175 | 
  | 
        cd [file dirname $argv] | 
| 176 | 
  | 
        set curfile [file tail $argv] | 
| 177 | 
  | 
        if {! [file exists $curfile]} { | 
| 178 | 
< | 
                newnew $argv | 
| 178 | 
> | 
                newnew $curfile | 
| 179 | 
  | 
                .scene invoke | 
| 180 | 
  | 
        } elseif {[newload $curfile]} { | 
| 181 | 
  | 
                if $alldone { |