25 |
|
global curhelp helpfontwidth |
26 |
|
if {! [winfo exists .helpwin]} { # Set up window |
27 |
|
toplevel .helpwin |
28 |
< |
wm minsize .helpwin 400 400 |
28 |
> |
wm minsize .helpwin 450 350 |
29 |
|
wm iconbitmap .helpwin question |
30 |
< |
frame .helpwin.but -geometry 200x500 |
30 |
> |
frame .helpwin.but -geometry 150x350 |
31 |
|
pack .helpwin.but -side right -fill none -expand no |
32 |
|
label .helpwin.but.lab -textvariable curhelp(title) |
33 |
|
place .helpwin.but.lab -relx .1667 -rely 0 |
80 |
|
helplink .helpwin.but.done help help done |
81 |
|
text .helpwin.txt -wrap word -width 48 -height 20 -bd 2 \ |
82 |
|
-yscrollcommand ".helpwin.sb set" -relief raised \ |
83 |
< |
-font -*-courier-medium-r-normal--18-*-*-*-*-*-iso8859-1 |
83 |
> |
-font -*-courier-medium-r-normal--14-*-*-*-*-*-iso8859-1 |
84 |
|
.helpwin.txt tag configure highlight \ |
85 |
< |
-font -*-courier-bold-r-normal--18-*-*-*-*-*-iso8859-1 |
86 |
< |
set helpfontwidth 11 |
85 |
> |
-font -*-courier-bold-r-normal--14-*-*-*-*-*-iso8859-1 |
86 |
> |
set helpfontwidth 9 |
87 |
|
scrollbar .helpwin.sb -relief flat \ |
88 |
|
-command ".helpwin.txt yview" |
89 |
|
pack .helpwin.sb -side right -fill y |
91 |
|
helplink .helpwin.sb help helpwin scroll |
92 |
|
helplink .helpwin.txt help helpwin intro |
93 |
|
tkwait visibility .helpwin |
94 |
– |
update |
94 |
|
} elseif {! [winfo ismapped .helpwin]} { # map window |
95 |
|
wm deiconify .helpwin |
96 |
|
} else { # raise window |
123 |
|
set curhelp(title) "[string toupper\ |
124 |
|
[file rootname [file tail $fname]]] HELP" |
125 |
|
wm iconname .helpwin [string tolower $curhelp(title)] |
126 |
+ |
.helpwin.txt configure -state normal |
127 |
+ |
.helpwin.txt delete 1.0 end |
128 |
+ |
.helpwin.txt insert end "Loading $fname..." |
129 |
+ |
update |
130 |
|
set curhelp(fid) [open $fname r] |
131 |
|
set curhelp(index) {} |
132 |
|
set catlist {} |