LicenceBox.st
changeset 1242 dcaf3fb826da
parent 1239 ae99d201a28d
child 1243 e955dcfe26a2
equal deleted inserted replaced
1241:11749610046e 1242:dcaf3fb826da
   131 initialize    
   131 initialize    
   132     |textView smallScreen nLines|
   132     |textView smallScreen nLines|
   133 
   133 
   134     super initialize.
   134     super initialize.
   135 
   135 
   136     smallScreen := (Display height < 1024).
   136     (Display height < 1024) ifTrue:[
   137     nLines := smallScreen ifTrue:[20] ifFalse:[40].
   137         (Display height < 768) ifTrue:[
       
   138 	    nLines := 20
       
   139 	] ifFalse:[
       
   140 	    nLines := 30
       
   141 	]
       
   142     ] ifFalse:[
       
   143         nLines := 40
       
   144     ].
   138 
   145 
   139     accepted := false.
   146     accepted := false.
   140 
   147 
   141     (self addTextLabel:(resources string:'Please read the licence terms:')) adjust:#left.
   148     (self addTextLabel:(resources string:'Please read the licence terms:')) adjust:#left.
   142     textView := self addTextBoxOn:nil 
   149     textView := self addTextBoxOn:nil 
   163     "get filename of licence file"
   170     "get filename of licence file"
   164 
   171 
   165     |fn sysFile|
   172     |fn sysFile|
   166 
   173 
   167     fileName isNil ifTrue:[
   174     fileName isNil ifTrue:[
   168         fileName := fn := resources at:'LICENCEFILE' default:nil.
   175 	fileName := fn := resources at:'LICENCEFILE' default:nil.
   169         fileName isNil ifTrue:[
   176 	fileName isNil ifTrue:[
   170             Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[
   177 	    Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[
   171                 fn := 'doc/online/english/LICENCE_DEMO_STX.html'.
   178 		fn := 'doc/online/english/LICENCE_DEMO_STX.html'.
   172             ] ifFalse:[
   179 	    ] ifFalse:[
   173                 fn := 'doc/online/english/LICENCE_STX.html'.
   180 		fn := 'doc/online/english/LICENCE_STX.html'.
   174             ].
   181 	    ].
   175             fileName := fn.
   182 	    fileName := fn.
   176         ].
   183 	].
   177 
   184 
   178         fileName asFilename exists ifFalse:[
   185 	fileName asFilename exists ifFalse:[
   179             fileName := Smalltalk getSystemFileName:fileName.
   186 	    fileName := Smalltalk getSystemFileName:fileName.
   180             fileName isNil ifTrue:[
   187 	    fileName isNil ifTrue:[
   181                 fileName := '../../' , fn.
   188 		fileName := '../../' , fn.
   182                 fileName asFilename exists ifFalse:[
   189 		fileName asFilename exists ifFalse:[
   183                     fileName := Smalltalk getSystemFileName:'doc/online/german/LICENCE_STX.html'.
   190 		    fileName := Smalltalk getSystemFileName:'doc/online/german/LICENCE_STX.html'.
   184                     fileName isNil ifTrue:[
   191 		    fileName isNil ifTrue:[
   185                         fileName := '../../doc/online/german/LICENCE_STX.html'.
   192 			fileName := '../../doc/online/german/LICENCE_STX.html'.
   186                     ]
   193 		    ]
   187                 ].
   194 		].
   188             ].
   195 	    ].
   189         ].
   196 	].
   190         fileName asFilename exists ifFalse:[
   197 	fileName asFilename exists ifFalse:[
   191             fileName := nil
   198 	    fileName := nil
   192         ].
   199 	].
   193     ].
   200     ].
   194     ^ fileName 
   201     ^ fileName 
   195 
   202 
   196     "
   203     "
   197      LicenceBox new licenceFile
   204      LicenceBox new licenceFile
   235 ! !
   242 ! !
   236 
   243 
   237 !LicenceBox class methodsFor:'documentation'!
   244 !LicenceBox class methodsFor:'documentation'!
   238 
   245 
   239 version
   246 version
   240     ^ '$Header: /cvs/stx/stx/libwidg2/LicenceBox.st,v 1.10 1999-03-08 11:28:40 cg Exp $'
   247     ^ '$Header: /cvs/stx/stx/libwidg2/LicenceBox.st,v 1.11 1999-03-09 22:29:30 cg Exp $'
   241 ! !
   248 ! !
   242 LicenceBox initialize!
   249 LicenceBox initialize!