AboutBox.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 28 Aug 2013 12:52:38 +0100
branchjv
changeset 13465 1f1e8b6710c8
parent 12572 8049ed54a850
child 15566 184cea584be5
permissions -rw-r--r--
Bugfix Tools::CodeView2::GutterView - do not redraw gutter if its not shown. This actually fixes DNU when CodeView2 is used in diff view. Then the second gutter is not shown and #yOfTextViewLine: returns nil (bad) which leads to DNU.
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
"
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    12
"{ Package: 'stx:libtool' }"
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    13
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    14
InfoBox subclass:#AboutBox
451
35d5ba59ee0e added access method for background color
Claus Gittinger <cg@exept.de>
parents: 248
diff changeset
    15
	instanceVariableNames:''
9801
536bda9c36ce set icon resource
Stefan Vogel <sv@exept.de>
parents: 8988
diff changeset
    16
	classVariableNames:'DefaultGreen'
451
35d5ba59ee0e added access method for background color
Claus Gittinger <cg@exept.de>
parents: 248
diff changeset
    17
	poolDictionaries:''
35d5ba59ee0e added access method for background color
Claus Gittinger <cg@exept.de>
parents: 248
diff changeset
    18
	category:'Views-DialogBoxes'
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    19
!
700f3924df1d Initial revision
claus
parents:
diff changeset
    20
879
8582038d1287 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 708
diff changeset
    21
!AboutBox class methodsFor:'documentation'!
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    22
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    23
copyright
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    24
"
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    25
 COPYRIGHT (c) 1995 by Claus Gittinger
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    26
	      All Rights Reserved
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    27
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    28
 This software is furnished under a license and may be used
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    29
 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
    30
 inclusion of the above copyright notice.   This software may not
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    31
 be provided or otherwise made available to, or used by, any
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    32
 other person.  No title to or ownership of the software is
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    33
 hereby transferred.
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
    34
"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    35
!
700f3924df1d Initial revision
claus
parents:
diff changeset
    36
700f3924df1d Initial revision
claus
parents:
diff changeset
    37
documentation
700f3924df1d Initial revision
claus
parents:
diff changeset
    38
"
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    39
    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
    40
    As a speciality, this box automatically closes if left
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    41
    alone for a while.
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    42
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    43
    Can be subclasses for your own aboutBoxes; to do so, redefine
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    44
    #defaultIcon and #aboutText.
92
claus
parents: 84
diff changeset
    45
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    46
    examples:
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    47
        AboutBox new open
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    48
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
    49
        AboutBox new showAtPointer
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    50
"
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    51
!
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    52
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    53
examples
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    54
"
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    55
                                                                [exBegin]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    56
    |box|
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    57
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    58
    box := AboutBox new.
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    59
    box autoHideAfter:10 with:[].
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    60
    box showAtCenter
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    61
                                                                [exEnd]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    62
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    63
                                                                [exBegin]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    64
    |box|
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    65
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    66
    box := AboutBox title:'About me'.
5333
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    67
    box image:((Smalltalk 
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    68
                    bitmapFromFileNamed:'gifImages/claus.gif' 
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    69
                    inPackage:'stx:goodies') 
4decff66d67a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4864
diff changeset
    70
                magnifiedTo:100@100).
2700
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    71
    box label:'Example'.
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    72
    box autoHideAfter:10 with:[].
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    73
    box showAtPointer.
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    74
                                                                [exEnd]
854f2402bc08 documentation
Claus Gittinger <cg@exept.de>
parents: 2477
diff changeset
    75
"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
    76
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
    77
12572
8049ed54a850 Merged b2e5fdb702cb and 27c2f7b1baa4 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431 12559
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
8701
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
    85
    |paddedLabelWith distributor expiration machine info resources|
7795
7462ac21e65e +imageStartTime
Claus Gittinger <cg@exept.de>
parents: 7721
diff changeset
    86
7462ac21e65e +imageStartTime
Claus Gittinger <cg@exept.de>
parents: 7721
diff changeset
    87
    resources := self classResources.
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
    88
8701
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
    89
    paddedLabelWith := 
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
    90
        [:label :value |
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
    91
            (((resources string:label) , ' ') paddedTo:20 with:$.) , ' ' , value
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
    92
        ].
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
    93
693
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
    94
    distributor := Smalltalk distributorString.
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
    95
    distributor notEmpty ifTrue:[
8701
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
    96
        distributor := paddedLabelWith value:'Distributor' value:distributor
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    97
    ].
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    98
    expiration := Smalltalk expirationTime.
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
    99
    expiration notNil ifTrue:[
8701
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
   100
        expiration := paddedLabelWith value:'Expires' value:expiration
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   101
    ] ifFalse:[
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   102
        expiration := ''.
693
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
   103
    ].
1797
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   104
    machine := OperatingSystem getHostName.
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   105
    info := OperatingSystem getSystemInfo.
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   106
    (info includesKey:#machine) ifTrue:[
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   107
        machine := machine , ' (' , (info at:#machine) , ')'
9435a66ce32a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1592
diff changeset
   108
    ].
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   109
92
claus
parents: 84
diff changeset
   110
    ^
7721
bbb68c4df2de *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6625
diff changeset
   111
'Smalltalk/X
92
claus
parents: 84
diff changeset
   112
8701
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
   113
' , (paddedLabelWith value:'Version' value:Smalltalk versionString),'.', Smalltalk releaseNr printString ,
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   114
                      ' (' , Smalltalk versionDate printString , ')
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   115
', distributor, '
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   116
', expiration , '
8701
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
   117
' , (paddedLabelWith value:'Release ID' value:Smalltalk releaseIdentification) , '
12559
bee4ae7c8b8b class: AboutBox
Claus Gittinger <cg@exept.de>
parents: 9801
diff changeset
   118
' , (paddedLabelWith value:'Configuration' value:Smalltalk configuration) , ' (' , (ExternalAddress pointerSize * 8) printString,'bit)
8701
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
   119
' , (paddedLabelWith value:'Running on' value:machine) , '
3e4346724b96 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7961
diff changeset
   120
' , (paddedLabelWith value:'Started at' value:Smalltalk imageStartTime printString) , '
92
claus
parents: 84
diff changeset
   121
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   122
' , Smalltalk copyrightString , '
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   123
693
29bbbc339107 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 498
diff changeset
   124
'
179
f464e3c75104 if nonEmpty, display distributorString
Claus Gittinger <cg@exept.de>
parents: 165
diff changeset
   125
7721
bbb68c4df2de *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6625
diff changeset
   126
    "Modified: / 06-09-1996 / 10:11:08 / stefan"
7795
7462ac21e65e +imageStartTime
Claus Gittinger <cg@exept.de>
parents: 7721
diff changeset
   127
    "Modified: / 16-04-2007 / 16:17:34 / cg"
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   128
!
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   129
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   130
defaultGreen
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   131
    "return the boxes default green color (eXept green)."
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   132
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   133
    DefaultGreen notNil ifTrue:[^ DefaultGreen].
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   134
    ^ Color red:0 green:80 blue:20
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   135
!
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   136
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   137
defaultIcon
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   138
    "return a smalltalk/X icon.
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   139
     Can be redefined in custom subclasses."
198
2b044adb45a7 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 186
diff changeset
   140
9801
536bda9c36ce set icon resource
Stefan Vogel <sv@exept.de>
parents: 8988
diff changeset
   141
    <resource: #programImage>
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   142
9801
536bda9c36ce set icon resource
Stefan Vogel <sv@exept.de>
parents: 8988
diff changeset
   143
    ^ Icon stxIconTransparent3.
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   144
!
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   145
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   146
defaultLabel
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   147
    "return the boxes default window title."
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   148
6625
d8ceed41c361 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5834
diff changeset
   149
    ^ 'About...'
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   150
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   151
    "Modified: 23.4.1996 / 17:09:48 / cg"
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   152
    "Created: 23.4.1996 / 17:11:46 / cg"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   153
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
   154
12572
8049ed54a850 Merged b2e5fdb702cb and 27c2f7b1baa4 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431 12559
diff changeset
   155
8988
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   156
!AboutBox class methodsFor:'image specs'!
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   157
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   158
stxIconTemplate
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   159
    "This resource specification was automatically generated
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   160
     by the ImageEditor of ST/X."
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   161
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   162
    "Do not manually edit this!! If it is corrupted,
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   163
     the ImageEditor may not be able to read the specification."
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   164
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   165
    "
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   166
     self stxIconTemplate inspect
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   167
     ImageEditor openOnClass:self andSelector:#stxIconTemplate
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   168
     Icon flushCachedIcons
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   169
    "
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   170
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   171
    <resource: #image>
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   172
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   173
    ^Icon
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   174
        constantNamed:'AboutBox class stxIconTemplate'
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   175
        ifAbsentPut:[(Depth1Image new) width: 48; height: 48; photometric:(#palette); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   176
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   177
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   178
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   179
@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0]; mask:((Depth1Image new) width: 48; height: 48; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   180
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@G@@@A @@O @@C@@@O @@F@@@O @@L@@@O0@@\@@@O0@@8@@@G0@A0@@@G8@C @@@C8@G@@@@C<@N@@
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   181
@@A<@\@@@@A>@8@@@@@>A0@@@@@_C @@@@@_G @@@@@O/@@@@@@O>@@@@@@G<@@@@@@G8@@@@@@C8@@@@@@G8@@@@@@O<@@@@@@_<@@@@@@>^@@@@@A<N@@@
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   182
@@C8O@@@@@O0G @@@@_ C @@@@?@A0@@@A>@A0@@@C<@@8@@@O8@@\@@@_0@@L@@@? @@N@@@? @@F@@@?@@@C@@@^@@@A@@@@@@@@ @@@@@@@@@@@@@@@@@
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   183
@@@@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   184
! !
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   185
12572
8049ed54a850 Merged b2e5fdb702cb and 27c2f7b1baa4 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431 12559
diff changeset
   186
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   187
!AboutBox methodsFor:'initialization'!
700f3924df1d Initial revision
claus
parents:
diff changeset
   188
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   189
initialize
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   190
    "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
   191
107
claus
parents: 105
diff changeset
   192
    |dark green lbl|
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   193
700f3924df1d Initial revision
claus
parents:
diff changeset
   194
    super initialize.
700f3924df1d Initial revision
claus
parents:
diff changeset
   195
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   196
"/    self label:'About ...'.
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   197
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   198
    green := self class defaultGreen.    
7961
f5545f9cf057 aboutToObenBoxNotification for aboutBox
Claus Gittinger <cg@exept.de>
parents: 7839
diff changeset
   199
    dark := Color grey:20.
2727
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   200
    device hasColors ifFalse:[
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   201
        device hasGrayscales ifTrue:[
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   202
            green := Color brightness:(green brightness).    
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   203
            dark := Color brightness:(dark brightness).    
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   204
        ] ifFalse:[
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   205
            green := Color white.
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   206
            dark := Color black.
7e0930ea0c01 color setup changed
Claus Gittinger <cg@exept.de>
parents: 2700
diff changeset
   207
        ]
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   208
    ].
700f3924df1d Initial revision
claus
parents:
diff changeset
   209
452
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   210
    self withAllSubViewsDo:[:s | s viewBackground:dark].
248
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   211
5834
2a6457a7d2d7 Use #image: instead of obsolete #form:
Stefan Vogel <sv@exept.de>
parents: 5554
diff changeset
   212
    self image:(self class defaultIcon).
452
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   213
    (lbl := self formLabel) viewBackground:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   214
    lbl foregroundColor:green backgroundColor:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   215
    (lbl := self textLabel) viewBackground:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   216
    lbl foregroundColor:White backgroundColor:dark.
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   217
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   218
    self title:(self class aboutText).
6625
d8ceed41c361 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5834
diff changeset
   219
    self okText:(resources string:'Close').
452
33ce1b3cd502 oops - the last one was wrong
Claus Gittinger <cg@exept.de>
parents: 451
diff changeset
   220
1592
68d7e59d0c06 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 879
diff changeset
   221
    "Modified: / 12.6.1998 / 11:48:23 / cg"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   222
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
   223
12572
8049ed54a850 Merged b2e5fdb702cb and 27c2f7b1baa4 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431 12559
diff changeset
   224
4864
d584b65842b8 method category rename
Claus Gittinger <cg@exept.de>
parents: 2727
diff changeset
   225
!AboutBox methodsFor:'show & hide'!
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   226
700f3924df1d Initial revision
claus
parents:
diff changeset
   227
show
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   228
    "show the box.
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   229
     Redefined to automatically hide myself after some time"
100
claus
parents: 92
diff changeset
   230
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   231
    self autoHideAfter:15 with:[].
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   232
    super showAtCenter.
700f3924df1d Initial revision
claus
parents:
diff changeset
   233
700f3924df1d Initial revision
claus
parents:
diff changeset
   234
    "
700f3924df1d Initial revision
claus
parents:
diff changeset
   235
     AboutBox new show
700f3924df1d Initial revision
claus
parents:
diff changeset
   236
    "
498
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   237
382ef0b86b30 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 452
diff changeset
   238
    "Modified: 23.4.1996 / 17:10:03 / cg"
708
f89ff543ea18 Display expiration time, if apropriate.
Stefan Vogel <sv@exept.de>
parents: 693
diff changeset
   239
    "Modified: 6.9.1996 / 09:47:10 / stefan"
84
700f3924df1d Initial revision
claus
parents:
diff changeset
   240
! !
700f3924df1d Initial revision
claus
parents:
diff changeset
   241
12572
8049ed54a850 Merged b2e5fdb702cb and 27c2f7b1baa4 (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12431 12559
diff changeset
   242
879
8582038d1287 use Image instead of Form
Claus Gittinger <cg@exept.de>
parents: 708
diff changeset
   243
!AboutBox class methodsFor:'documentation'!
248
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   244
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   245
version
12559
bee4ae7c8b8b class: AboutBox
Claus Gittinger <cg@exept.de>
parents: 9801
diff changeset
   246
    ^ '$Header: /cvs/stx/stx/libtool/AboutBox.st,v 1.39 2013-03-27 21:38:42 cg Exp $'
8988
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   247
!
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   248
8a0410006a9c added: #stxIconTemplate
Claus Gittinger <cg@exept.de>
parents: 8701
diff changeset
   249
version_CVS
12559
bee4ae7c8b8b class: AboutBox
Claus Gittinger <cg@exept.de>
parents: 9801
diff changeset
   250
    ^ '$Header: /cvs/stx/stx/libtool/AboutBox.st,v 1.39 2013-03-27 21:38:42 cg Exp $'
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   251
!
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   252
12431
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   253
version_HG
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   254
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   255
    ^ '$Changeset: <not expanded> $'
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   256
!
9f0c59c742d5 Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12128
diff changeset
   257
12128
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   258
version_SVN
a7ff7d66ee85 Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12125
diff changeset
   259
    ^ '$Id: AboutBox.st 7854 2012-01-30 17:49:41Z vranyj1 $'
248
3813e693e329 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 198
diff changeset
   260
! !
12559
bee4ae7c8b8b class: AboutBox
Claus Gittinger <cg@exept.de>
parents: 9801
diff changeset
   261