1 " |
1 " |
2 COPYRIGHT (c) 1996 by eXept Software AG |
2 COPYRIGHT (c) 1996 by eXept Software AG |
3 All Rights Reserved |
3 All Rights Reserved |
4 |
4 |
5 This software is furnished under a license and may be used |
5 This software is furnished under a license and may be used |
6 only in accordance with the terms of that license and with the |
6 only in accordance with the terms of that license and with the |
7 inclusion of the above copyright notice. This software may not |
7 inclusion of the above copyright notice. This software may not |
8 be provided or otherwise made available to, or used by, any |
8 be provided or otherwise made available to, or used by, any |
22 !LicenceBox class methodsFor:'documentation'! |
22 !LicenceBox class methodsFor:'documentation'! |
23 |
23 |
24 copyright |
24 copyright |
25 " |
25 " |
26 COPYRIGHT (c) 1996 by eXept Software AG |
26 COPYRIGHT (c) 1996 by eXept Software AG |
27 All Rights Reserved |
27 All Rights Reserved |
28 |
28 |
29 This software is furnished under a license and may be used |
29 This software is furnished under a license and may be used |
30 only in accordance with the terms of that license and with the |
30 only in accordance with the terms of that license and with the |
31 inclusion of the above copyright notice. This software may not |
31 inclusion of the above copyright notice. This software may not |
32 be provided or otherwise made available to, or used by, any |
32 be provided or otherwise made available to, or used by, any |
136 super initialize. |
136 super initialize. |
137 accepted := false. |
137 accepted := false. |
138 |
138 |
139 (self addTextLabel:(resources string:'Please read the licence terms:')) adjust:#left. |
139 (self addTextLabel:(resources string:'Please read the licence terms:')) adjust:#left. |
140 textView := self addTextBoxOn:nil |
140 textView := self addTextBoxOn:nil |
141 class:HTMLDocumentView |
141 class:HTMLDocumentView |
142 withNumberOfLines:40 |
142 withNumberOfLines:40 |
143 hScrollable:true |
143 hScrollable:true |
144 vScrollable:true. |
144 vScrollable:true. |
|
145 |
145 self width:(textView preferredExtentForLines:40 cols:70) x. |
146 self width:(textView preferredExtentForLines:40 cols:70) x. |
146 textView setText:(self licenceText). |
147 textView setText:(self licenceText). |
147 textView setTopDirectoryName:(self topDirectory). |
148 textView setTopDirectoryName:(self topDirectory). |
148 self addAbortButtonLabelled:(resources string:'reject licence terms'). |
149 self addAbortButtonLabelled:(resources string:'reject licence terms'). |
149 self addOkButtonLabelled:(resources string:'accept licence terms'). |
150 self addOkButtonLabelled:(resources string:'accept licence terms'). |
160 "get filename of licence file" |
161 "get filename of licence file" |
161 |
162 |
162 |fn| |
163 |fn| |
163 |
164 |
164 fileName isNil ifTrue:[ |
165 fileName isNil ifTrue:[ |
165 fileName := fn := resources at:'LICENCEFILE' default:nil. |
166 fileName := fn := resources at:'LICENCEFILE' default:nil. |
166 fileName isNil ifTrue:[ |
167 fileName isNil ifTrue:[ |
167 fileName := fn := 'doc/online/english/LICENCE.STX.html'. |
168 fileName := fn := 'doc/online/english/LICENCE.STX.html'. |
168 ]. |
169 ]. |
169 fileName asFilename exists ifFalse:[ |
170 fileName asFilename exists ifFalse:[ |
170 fileName := Smalltalk getSystemFileName:fileName. |
171 fileName := Smalltalk getSystemFileName:fileName. |
171 fileName isNil ifTrue:[ |
172 fileName isNil ifTrue:[ |
172 fileName := '../../' , fn. |
173 fileName := '../../' , fn. |
173 fileName asFilename exists ifFalse:[ |
174 fileName asFilename exists ifFalse:[ |
174 fileName := Smalltalk getSystemFileName:'doc/online/german/LICENCE.STX.html'. |
175 fileName := Smalltalk getSystemFileName:'doc/online/german/LICENCE.STX.html'. |
175 fileName isNil ifTrue:[ |
176 fileName isNil ifTrue:[ |
176 fileName := '../../doc/online/german/LICENCE.STX.html'. |
177 fileName := '../../doc/online/german/LICENCE.STX.html'. |
177 ] |
178 ] |
178 ] |
179 ] |
179 ]. |
180 ]. |
180 ]. |
181 ]. |
181 fileName asFilename exists ifFalse:[ |
182 fileName asFilename exists ifFalse:[ |
182 fileName := nil |
183 fileName := nil |
183 ]. |
184 ]. |
184 ]. |
185 ]. |
185 ^ fileName |
186 ^ fileName |
186 |
187 |
187 " |
188 " |
188 LicenceBox new licenceFile |
189 LicenceBox new licenceFile |