LicenceBox.st
author Jan Vrany <jan.vrany@labware.com>
Thu, 09 Feb 2023 14:03:49 +0000
branchjv
changeset 6265 09ae5bbed69e
parent 5814 70d07365a2d4
permissions -rw-r--r--
Cherry-picked Ruler.st from a3177d4a9ae5: * b2a3ee58d40c: #UI_ENHANCEMENT by exept, Claus Gittinger <cg@exept.de>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
     1
"
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
     2
 COPYRIGHT (c) 1996 by eXept Software AG
5814
70d07365a2d4 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5395
diff changeset
     3
 COPYRIGHT (c) 2016 Jan Vrany
250
645390ad8e95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
     4
	      All Rights Reserved
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
     5
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
     6
 This software is furnished under a license and may be used
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
     7
 only in accordance with the terms of that license and with the
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
     8
 inclusion of the above copyright notice.   This software may not
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
     9
 be provided or otherwise made available to, or used by, any
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
    10
 other person.  No title to or ownership of the software is
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
    11
 hereby transferred.
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
    12
"
2799
e57e0c9c28bd *** empty log message ***
penk
parents: 2798
diff changeset
    13
"{ Package: 'stx:libwidg2' }"
2795
889c4e545810 raising again (wrong focus in dialogs)
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
    14
5395
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
    15
"{ NameSpace: Smalltalk }"
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
    16
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    17
DialogBox subclass:#LicenceBox
1365
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
    18
	instanceVariableNames:'accepted destroySemaphore fileName textView'
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    19
	classVariableNames:'LicenceRejectSignal'
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    20
	poolDictionaries:''
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    21
	category:'Views-DialogBoxes'
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    22
!
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    23
875
48d482f90483 care for DEMO-licence text
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
    24
!LicenceBox class methodsFor:'documentation'!
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    25
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    26
copyright
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    27
"
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    28
 COPYRIGHT (c) 1996 by eXept Software AG
5814
70d07365a2d4 Copyright updates
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 5395
diff changeset
    29
 COPYRIGHT (c) 2016 Jan Vrany
250
645390ad8e95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
    30
	      All Rights Reserved
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    31
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    32
 This software is furnished under a license and may be used
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    33
 only in accordance with the terms of that license and with the
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    35
 be provided or otherwise made available to, or used by, any
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    36
 other person.  No title to or ownership of the software is
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    37
 hereby transferred.
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    38
"
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    39
!
243
82637ad60d26 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 241
diff changeset
    40
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    41
documentation
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    42
"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    43
    LicenceBox shows a licence text when opened, an returns true,
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    44
    if the licence has been accepted, false otherwise.
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    45
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    46
    [author:]
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    47
	Stefan Vogel
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    48
1364
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    49
    [start with:]
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    50
	LicenceBox open
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
    51
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    52
    [see also:]
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    53
	AboutBox
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    54
"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    55
!
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    56
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    57
examples
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    58
"
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    59
						[exBegin]
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    60
    LicenceRejectSignal handle:[:ex|
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    61
	Transcript showCR:'Licence rejected'.
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    62
    ] do:[
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    63
	LicenceBox open.
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    64
	Transcript showCR:'Licence accepted'.
2796
cb060f544b24 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
    65
    ]
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    66
						[exEnd]
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    67
"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    68
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    69
875
48d482f90483 care for DEMO-licence text
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
    70
!LicenceBox class methodsFor:'initialization'!
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    71
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    72
initialize
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    73
    LicenceRejectSignal isNil ifTrue:[
244
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    74
	LicenceRejectSignal := ErrorSignal newSignalMayProceed:true.
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    75
	LicenceRejectSignal nameClass:self message:#licenceRejectSignal.
646c3da97dd0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 243
diff changeset
    76
	LicenceRejectSignal notifierString:'licence rejected by user'.
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    77
    ].
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    78
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    79
    "
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    80
     self initialize
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    81
    "
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    82
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    83
875
48d482f90483 care for DEMO-licence text
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
    84
!LicenceBox class methodsFor:'instance creation'!
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    85
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    86
open
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    87
    "open myself modal and return true if accepted, false otherwise"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    88
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    89
    ^ super open accepted.
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    90
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    91
    "
250
645390ad8e95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
    92
     LicenceBox open
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    93
    "
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    94
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    95
    "Modified: 9.9.1996 / 17:52:48 / stefan"
1365
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
    96
!
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
    97
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
    98
openOnFile:aFileName
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
    99
    "like open, but show the HTML-text found in aFileName.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   100
     Can be used for end-user applications which want to display
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   101
     there own licence text."
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   102
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   103
    |box f fn text dir|
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   104
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   105
    box := self new.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   106
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   107
    (f := aFileName asFilename) exists ifTrue:[
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   108
	text := f contents.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   109
	dir := f directoryName.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   110
    ] ifFalse:[
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   111
	fn := Smalltalk getSystemFileName:aFileName.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   112
	fn notNil ifTrue:[
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   113
	    f := fn asFilename.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   114
	    text := f contents.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   115
	    dir := f directoryName.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   116
	]
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   117
    ].
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   118
    text notNil ifTrue:[
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   119
	box licenceText:text.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   120
	box topDirectory:dir.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   121
    ].
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   122
    box open
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   123
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   124
    "
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   125
     LicenceBox openOnFile:'doc/online/english/TOP.html'
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   126
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   127
     (LicenceBox licenceRejectSignal catch:[
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   128
	LicenceBox openOnFile:'doc/online/english/TOP.html'
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   129
     ]) ifTrue:[
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   130
	self information:'rejected'
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   131
      ]
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   132
    "
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   133
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   134
875
48d482f90483 care for DEMO-licence text
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
   135
!LicenceBox class methodsFor:'Signal constants'!
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   136
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   137
licenceRejectSignal
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   138
    "licence has been rejected by user"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   139
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   140
    ^ LicenceRejectSignal
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   141
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   142
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   143
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   144
!LicenceBox methodsFor:'accessing'!
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   145
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   146
accepted
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   147
    "return accepted"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   148
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   149
    ^ accepted
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   150
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   151
    "Created: 6.9.1996 / 13:24:44 / stefan"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   152
!
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   153
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   154
accepted:something
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   155
    "set accepted"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   156
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   157
    accepted := something.
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   158
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   159
    "Created: 6.9.1996 / 13:24:44 / stefan"
1365
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   160
!
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   161
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   162
licenceText:someHTMLText
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   163
    "set the text which is shown in the box"
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   164
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   165
    textView setText:someHTMLText.
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   166
!
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   167
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   168
topDirectory:aDirectoryName
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   169
    "set the topDirectory, which is required for hyperlinks
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   170
     to work (in the html text)"
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   171
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   172
    textView setTopDirectoryName:aDirectoryName.
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   173
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   174
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   175
!LicenceBox methodsFor:'destroying'!
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   176
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   177
terminate
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   178
    "this is the close from a windowmanager
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   179
     (only if UseTransientViews == true).
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   180
     Redefined, since ModalBox keeps the View alive (only hidden)"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   181
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   182
    self destroy.
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   183
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   184
    "Created: 9.9.1996 / 15:15:31 / stefan"
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   185
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   186
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   187
!LicenceBox methodsFor:'initialization'!
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   188
2796
cb060f544b24 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
   189
initialize
1365
138d2a797a62 allow for another file to be shown (for end-user apps)
Claus Gittinger <cg@exept.de>
parents: 1364
diff changeset
   190
    |nLines displayHeight|
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   191
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   192
    super initialize.
1239
ae99d201a28d smaller lic-box on small screens
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   193
4507
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   194
    displayHeight := self graphicsDevice usableHeight.
1364
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   195
    nLines := displayHeight // 25.
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   196
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   197
"/    (displayHeight < 800) ifTrue:[
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   198
"/        (displayHeight < 500) ifTrue:[
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   199
"/            nLines := 20
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   200
"/        ] ifFalse:[
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   201
"/            nLines := 30
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   202
"/        ]
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   203
"/    ] ifFalse:[
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   204
"/        nLines := 40
61457de0e18b compute the height from the displays height
Claus Gittinger <cg@exept.de>
parents: 1310
diff changeset
   205
"/    ].
1239
ae99d201a28d smaller lic-box on small screens
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   206
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   207
    accepted := false.
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   208
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   209
    (self addTextLabel:(resources string:'Please read the licence terms:')) adjust:#left.
2796
cb060f544b24 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
   210
    textView := self addTextBoxOn:nil
3860
2274e8f6c28e changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3396
diff changeset
   211
                        class:HTMLDocumentView
2274e8f6c28e changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3396
diff changeset
   212
                        withNumberOfLines:nLines
2274e8f6c28e changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3396
diff changeset
   213
                        hScrollable:true
2274e8f6c28e changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3396
diff changeset
   214
                        vScrollable:true.
250
645390ad8e95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
   215
1239
ae99d201a28d smaller lic-box on small screens
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
   216
    self width:(textView preferredExtentForLines:nLines cols:70) x.
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   217
    textView setText:(self licenceText).
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   218
    textView setTopDirectoryName:(self topDirectory).
2054
Claus Gittinger <cg@exept.de>
parents: 1627
diff changeset
   219
    self addAbortButtonLabelled:(resources string:'Reject licence terms').
Claus Gittinger <cg@exept.de>
parents: 1627
diff changeset
   220
    self addOkButtonLabelled:(resources string:'Accept licence terms').
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   221
    self abortAction:[self destroy. accepted := false. LicenceRejectSignal raise].
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   222
    self okAction:[self destroy. accepted := true].
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   223
    self stickAtBottomWithVariableHeight:textView.
3396
1f85adcd01fd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3395
diff changeset
   224
    self label:'ST/X Licence Dialog'.
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   225
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   226
    "Modified: 9.9.1996 / 17:52:13 / stefan"
2798
8d483cff1ca3 *** empty log message ***
penk
parents: 2796
diff changeset
   227
!
8d483cff1ca3 *** empty log message ***
penk
parents: 2796
diff changeset
   228
2800
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   229
mapped
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   230
    super mapped.
2801
014471b1e14b *** empty log message ***
penk
parents: 2800
diff changeset
   231
4661
f4b3a9ed36a7 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 4507
diff changeset
   232
    self graphicsDevice isWindowsPlatform ifTrue:[
4507
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   233
        "/ kludge
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   234
        [
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   235
            Delay waitForSeconds:0.5.
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   236
            self raise.
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   237
            self activate.
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   238
            self setForegroundWindow.
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   239
            self activate.
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   240
        ] fork.
2801
014471b1e14b *** empty log message ***
penk
parents: 2800
diff changeset
   241
    ].
2798
8d483cff1ca3 *** empty log message ***
penk
parents: 2796
diff changeset
   242
8d483cff1ca3 *** empty log message ***
penk
parents: 2796
diff changeset
   243
    "
8d483cff1ca3 *** empty log message ***
penk
parents: 2796
diff changeset
   244
     self open
8d483cff1ca3 *** empty log message ***
penk
parents: 2796
diff changeset
   245
    "
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   246
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   247
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   248
!LicenceBox methodsFor:'private'!
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   249
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   250
licenceFile
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   251
    "get filename of licence file"
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   252
1626
614d6e8db98d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1365
diff changeset
   253
    |relName|
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   254
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   255
    fileName isNil ifTrue:[
5395
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   256
        fileName := relName := resources at:'LICENCEFILE' default:nil.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   257
        fileName isNil ifTrue:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   258
            Smalltalk releaseIdentification = 'ST/X_free_demo_vsn' ifTrue:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   259
                relName := 'doc/online/english/LICENCE_DEMO_STX.html'.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   260
            ] ifFalse:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   261
                relName := 'doc/online/english/LICENCE_STX.html'.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   262
            ].
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   263
            fileName := relName.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   264
        ].
875
48d482f90483 care for DEMO-licence text
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
   265
5395
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   266
        fileName asFilename exists ifFalse:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   267
            fileName := Smalltalk getSystemFileName:relName.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   268
            fileName isNil ifTrue:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   269
                fileName := Smalltalk getSystemFileName:'doc/online/' , relName.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   270
                fileName isNil ifTrue:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   271
                    fileName := Smalltalk getSystemFileName:('../' , relName).
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   272
                    fileName isNil ifTrue:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   273
                        fileName := Smalltalk getSystemFileName:('../../' , relName).
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   274
                        fileName isNil ifTrue:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   275
                            fileName := Smalltalk getSystemFileName:'doc/online/german/LICENCE_STX.html'.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   276
                            fileName isNil ifTrue:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   277
                                fileName := '../../doc/online/german/LICENCE_STX.html'.
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   278
                            ]
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   279
                        ]
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   280
                    ].
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   281
                ].
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   282
            ]
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   283
        ].
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   284
        fileName asFilename exists ifFalse:[
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   285
            fileName := nil
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   286
        ].
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   287
    ].
2796
cb060f544b24 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
   288
    ^ fileName
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   289
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   290
    "
2796
cb060f544b24 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
   291
     LicenceBox new licenceFile
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   292
    "
875
48d482f90483 care for DEMO-licence text
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
   293
5395
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   294
    "Modified: / 23-04-1998 / 11:40:25 / cg"
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   295
    "Modified: / 30-12-2016 / 23:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   296
!
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   297
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   298
licenceText
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   299
    "get licence text"
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   300
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   301
    |file|
241
687df61a0e84 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 240
diff changeset
   302
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   303
    file := self licenceFile.
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   304
    file isNil ifTrue:[
2054
Claus Gittinger <cg@exept.de>
parents: 1627
diff changeset
   305
	^ 'oops - you are not supposed to remove the LICENSE file !!
1627
7bfaaad36045 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
   306
7bfaaad36045 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
   307
- or the documentation files have not been installed correctly;
7bfaaad36045 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1626
diff changeset
   308
- or your systemPath settings are not correct.'
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   309
    ].
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   310
    ^ file asFilename contents.
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   311
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   312
    "
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   313
     LicenceBox new licenceText
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   314
    "
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   315
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   316
!
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   317
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   318
topDirectory
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   319
    "get name of top directory"
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   320
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   321
    |file|
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   322
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   323
    file := self licenceFile.
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   324
    file isNil ifTrue:[
250
645390ad8e95 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 249
diff changeset
   325
	^ ''
249
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   326
    ].
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   327
    ^ file asFilename directoryName.
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   328
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   329
    "
6698113011ea Set top directory for relative HREFs.
Stefan Vogel <sv@exept.de>
parents: 245
diff changeset
   330
     LicenceBox new topDirectory
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   331
    "
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   332
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   333
! !
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   334
2800
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   335
!LicenceBox methodsFor:'queries'!
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   336
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   337
windowStyle
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   338
    ^ #normal.
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   339
    ^ #dialog.
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   340
    ^ super windowStyle.
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   341
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   342
    "
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   343
     self new windowStyle
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   344
    "
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   345
! !
0a970532a682 *** empty log message ***
penk
parents: 2799
diff changeset
   346
875
48d482f90483 care for DEMO-licence text
Claus Gittinger <cg@exept.de>
parents: 527
diff changeset
   347
!LicenceBox class methodsFor:'documentation'!
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   348
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   349
version
4661
f4b3a9ed36a7 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 4507
diff changeset
   350
    ^ '$Header: /cvs/stx/stx/libwidg2/LicenceBox.st,v 1.30 2014-09-25 19:43:38 stefan Exp $'
3860
2274e8f6c28e changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3396
diff changeset
   351
!
2274e8f6c28e changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3396
diff changeset
   352
2274e8f6c28e changed: #initialize
Claus Gittinger <cg@exept.de>
parents: 3396
diff changeset
   353
version_CVS
4661
f4b3a9ed36a7 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 4507
diff changeset
   354
    ^ '$Header: /cvs/stx/stx/libwidg2/LicenceBox.st,v 1.30 2014-09-25 19:43:38 stefan Exp $'
5395
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   355
!
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   356
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   357
version_HG
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   358
f34b4fa64217 Fixed license file path
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 4661
diff changeset
   359
    ^ '$Changeset: <not expanded> $'
245
7b986d50e79d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 244
diff changeset
   360
! !
2795
889c4e545810 raising again (wrong focus in dialogs)
Claus Gittinger <cg@exept.de>
parents: 2054
diff changeset
   361
4507
3235f9b064d5 class: LicenceBox
Stefan Vogel <sv@exept.de>
parents: 3860
diff changeset
   362
240
f24a0853e754 New class LicenceBox.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   363
LicenceBox initialize!