AboutBox.st
author Claus Gittinger <cg@exept.de>
Mon, 06 Mar 2006 09:37:10 +0100
changeset 6625 d8ceed41c361
parent 5834 2a6457a7d2d7
child 7721 bbb68c4df2de
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
84
700f3924df1d Initial revision
claus
parents:
diff changeset
     1
"
700f3924df1d Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
92
claus
parents: 84
diff changeset
     3
	      All Rights Reserved
84
700f3924df1d Initial revision
claus
parents:
diff changeset
     4
700f3924df1d Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
700f3924df1d Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
700f3924df1d Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
700f3924df1d Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
700f3924df1d Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
700f3924df1d Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
700f3924df1d Initial revision
claus
parents:
diff changeset
    11
"
700f3924df1d Initial revision
claus
parents:
diff changeset
    12
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    13
"{ Package: 'stx:libtool' }"
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    14
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    15
InfoBox subclass:#AboutBox
451
35d5ba59ee0e added access method for background color
Claus Gittinger <cg@exept.de>
parents: 248
diff changeset
    16
	instanceVariableNames:''
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
    17
	classVariableNames:'CachedIcon DefaultGreen'
451
35d5ba59ee0e added access method for background color
Claus Gittinger <cg@exept.de>
parents: 248
diff changeset
    18
	poolDictionaries:''
35d5ba59ee0e added access method for background color
Claus Gittinger <cg@exept.de>
parents: 248
diff changeset
    19
	category:'Views-DialogBoxes'
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    20
!
700f3924df1d Initial revision
claus
parents:
diff changeset
    21
879
8582038d1287 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 708
diff changeset
    22
!AboutBox class methodsFor:'documentation'!
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    23
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    24
copyright
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    25
"
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    26
 COPYRIGHT (c) 1995 by Claus Gittinger
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    27
	      All Rights Reserved
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    28
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    29
 This software is furnished under a license and may be used
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    30
 only in accordance with the terms of that license and with the
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    32
 be provided or otherwise made available to, or used by, any
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    33
 other person.  No title to or ownership of the software is
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    34
 hereby transferred.
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    35
"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    36
!
700f3924df1d Initial revision
claus
parents:
diff changeset
    37
700f3924df1d Initial revision
claus
parents:
diff changeset
    38
documentation
700f3924df1d Initial revision
claus
parents:
diff changeset
    39
"
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    40
    A box specialized to show the ST/X about-information (also usable for Applications).
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    41
    As a speciality, this box automatically closes if left
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    42
    alone for a while.
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    43
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    44
    Can be subclasses for your own aboutBoxes; to do so, redefine
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    45
    #defaultIcon and #aboutText.
92
claus
parents: 84
diff changeset
    46
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    47
    examples:
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    48
        AboutBox new open
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    49
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    50
        AboutBox new showAtPointer
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    51
"
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    52
!
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    53
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    54
examples
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    55
"
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    56
                                                                [exBegin]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    57
    |box|
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    58
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    59
    box := AboutBox new.
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    60
    box autoHideAfter:10 with:[].
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    61
    box showAtCenter
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    62
                                                                [exEnd]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    63
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    64
                                                                [exBegin]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    65
    |box|
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    66
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    67
    box := AboutBox title:'About me'.
5333
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    68
    box image:((Smalltalk 
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    69
                    bitmapFromFileNamed:'gifImages/claus.gif' 
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    70
                    inPackage:'stx:goodies') 
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    71
                magnifiedTo:100@100).
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    72
    box label:'Example'.
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    73
    box autoHideAfter:10 with:[].
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    74
    box showAtPointer.
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    75
                                                                [exEnd]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    76
"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    77
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
    78
879
8582038d1287 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 708
diff changeset
    79
!AboutBox class methodsFor:'defaults'!
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    80
92
claus
parents: 84
diff changeset
    81
aboutText
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    82
    "return a string to be shown in the box.
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    83
     Can be redefined in custom subclasses."
125
claus
parents: 111
diff changeset
    84
1797
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
    85
    |distributor expiration machine info|
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
    86
693
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
    87
    distributor := Smalltalk distributorString.
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
    88
    distributor notEmpty ifTrue:[
5554
Claus Gittinger <cg@exept.de>
parents: 5333
diff changeset
    89
        distributor := (((self classResources string:'Distributor') , ' ') paddedTo:20 with:$.) , ' ' , distributor
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    90
    ].
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    91
    expiration := Smalltalk expirationTime.
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    92
    expiration notNil ifTrue:[
5554
Claus Gittinger <cg@exept.de>
parents: 5333
diff changeset
    93
        expiration := (((self classResources string:'Expires') , ' ') paddedTo:20 with:$.) , ' ' , expiration
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    94
    ] ifFalse:[
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    95
        expiration := ''.
693
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
    96
    ].
1797
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
    97
    machine := OperatingSystem getHostName.
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
    98
    info := OperatingSystem getSystemInfo.
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
    99
    (info includesKey:#machine) ifTrue:[
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   100
        machine := machine , ' (' , (info at:#machine) , ')'
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   101
    ].
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   102
92
claus
parents: 84
diff changeset
   103
    ^
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   104
'SmallTalk/X
92
claus
parents: 84
diff changeset
   105
5554
Claus Gittinger <cg@exept.de>
parents: 5333
diff changeset
   106
' , (((self classResources string:'Version') , ' ') paddedTo:20 with:$.) , ' ', Smalltalk versionString , '.' , Smalltalk releaseNr printString ,
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   107
                      ' (' , Smalltalk versionDate printString , ')
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   108
', distributor, '
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   109
', expiration , '
5554
Claus Gittinger <cg@exept.de>
parents: 5333
diff changeset
   110
' , (((self classResources string:'Release ID') , ' ') paddedTo:20 with:$.) , ' ' , Smalltalk releaseIdentification , '
Claus Gittinger <cg@exept.de>
parents: 5333
diff changeset
   111
' , (((self classResources string:'Configuration') , ' ') paddedTo:20 with:$.) , ' ' , Smalltalk configuration , '
Claus Gittinger <cg@exept.de>
parents: 5333
diff changeset
   112
' , (((self classResources string:'Running on') , ' ') paddedTo:20 with:$.) , ' ' , machine , '
92
claus
parents: 84
diff changeset
   113
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   114
' , Smalltalk copyrightString , '
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   115
693
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
   116
'
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   117
1797
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   118
    "Modified: / 6.9.1996 / 10:11:08 / stefan"
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   119
    "Modified: / 4.8.1998 / 02:28:29 / cg"
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   120
!
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   121
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   122
defaultGreen
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   123
    "return the boxes default green color (eXept green)."
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   124
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   125
    DefaultGreen notNil ifTrue:[^ DefaultGreen].
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   126
    ^ Color red:0 green:80 blue:20
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   127
!
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   128
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   129
defaultIcon
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   130
    "return a smalltalk/X icon.
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   131
     Can be redefined in custom subclasses."
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   132
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   133
    CachedIcon isNil ifTrue:[
2169
4059c2a4e407 changed the defaultIcon
Claus Gittinger <cg@exept.de>
parents: 1797
diff changeset
   134
        CachedIcon := Icon stxIcon.
4059c2a4e407 changed the defaultIcon
Claus Gittinger <cg@exept.de>
parents: 1797
diff changeset
   135
        CachedIcon isNil ifTrue:[
2477
cfb8a4d7b557 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2455
diff changeset
   136
            CachedIcon := Smalltalk imageFromFileNamed:'SmalltalkX.xbm' inPackage:'stx:libtool'
2169
4059c2a4e407 changed the defaultIcon
Claus Gittinger <cg@exept.de>
parents: 1797
diff changeset
   137
        ]
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   138
    ].
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   139
    ^ CachedIcon
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   140
2169
4059c2a4e407 changed the defaultIcon
Claus Gittinger <cg@exept.de>
parents: 1797
diff changeset
   141
    "Modified: / 25.5.1999 / 15:44:48 / cg"
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   142
!
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   143
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   144
defaultLabel
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   145
    "return the boxes default window title."
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   146
6625
d8ceed41c361 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5834
diff changeset
   147
    ^ 'About...'
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   148
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   149
    "Modified: 23.4.1996 / 17:09:48 / cg"
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   150
    "Created: 23.4.1996 / 17:11:46 / cg"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   151
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
   152
700f3924df1d Initial revision
claus
parents:
diff changeset
   153
!AboutBox methodsFor:'initialization'!
700f3924df1d Initial revision
claus
parents:
diff changeset
   154
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   155
initialize
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   156
    "setup the box; change all of my components viewBackground to some darkish grey."
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   157
107
claus
parents: 105
diff changeset
   158
    |dark green lbl|
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   159
700f3924df1d Initial revision
claus
parents:
diff changeset
   160
    super initialize.
700f3924df1d Initial revision
claus
parents:
diff changeset
   161
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   162
"/    self label:'About ...'.
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   163
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   164
    green := self class defaultGreen.    
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   165
    dark := Color grey:10.
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   166
    device hasColors ifFalse:[
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   167
        device hasGrayscales ifTrue:[
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   168
            green := Color brightness:(green brightness).    
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   169
            dark := Color brightness:(dark brightness).    
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   170
        ] ifFalse:[
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   171
            green := Color white.
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   172
            dark := Color black.
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   173
        ]
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   174
    ].
700f3924df1d Initial revision
claus
parents:
diff changeset
   175
452
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   176
    self withAllSubViewsDo:[:s | s viewBackground:dark].
248
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   177
5834
2a6457a7d2d7 Use #image: instead of obsolete #form:
Stefan Vogel <sv@exept.de>
parents: 5554
diff changeset
   178
    self image:(self class defaultIcon).
452
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   179
    (lbl := self formLabel) viewBackground:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   180
    lbl foregroundColor:green backgroundColor:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   181
    (lbl := self textLabel) viewBackground:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   182
    lbl foregroundColor:White backgroundColor:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   183
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   184
    self title:(self class aboutText).
6625
d8ceed41c361 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5834
diff changeset
   185
    self okText:(resources string:'Close').
452
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   186
1592
68d7e59d0c06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 879
diff changeset
   187
    "Modified: / 12.6.1998 / 11:48:23 / cg"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   188
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
   189
4864
d584b65842b8 method category rename
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
   190
!AboutBox methodsFor:'show & hide'!
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   191
700f3924df1d Initial revision
claus
parents:
diff changeset
   192
show
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   193
    "show the box.
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   194
     Redefined to automatically hide myself after some time"
100
claus
parents: 92
diff changeset
   195
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   196
    self autoHideAfter:15 with:[].
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   197
    super showAtCenter.
700f3924df1d Initial revision
claus
parents:
diff changeset
   198
700f3924df1d Initial revision
claus
parents:
diff changeset
   199
    "
700f3924df1d Initial revision
claus
parents:
diff changeset
   200
     AboutBox new show
700f3924df1d Initial revision
claus
parents:
diff changeset
   201
    "
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   202
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   203
    "Modified: 23.4.1996 / 17:10:03 / cg"
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   204
    "Modified: 6.9.1996 / 09:47:10 / stefan"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   205
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
   206
879
8582038d1287 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 708
diff changeset
   207
!AboutBox class methodsFor:'documentation'!
248
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   208
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   209
version
6625
d8ceed41c361 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5834
diff changeset
   210
    ^ '$Header: /cvs/stx/stx/libtool/AboutBox.st,v 1.31 2006-03-06 08:37:10 cg Exp $'
248
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   211
! !