TreeItemWithImage.st
author Jan Vrany <jan.vrany@labware.com>
Fri, 02 Sep 2022 11:25:39 +0100
branchjv
changeset 6261 9b7eb7159d29
parent 1717 ad30640ff659
permissions -rw-r--r--
Fix loong standing bug with some menus not being translated / resolved This has happened with browser "View" menu when sometimes it had the slice resolved and sometimes not. It turned out that it was because the code disabled resources (and therefore slices) resolution when processing shortcuts, so the menu was created and cached unresolved. This fixes the issue. eXept apparently run into the same problem.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1717
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     1
"
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     2
 COPYRIGHT (c) 1999 eXept Software AG
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     3
              All Rights Reserved
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     4
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     5
 This software is furnished under a license and may be used
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     6
 only in accordance with the terms of that license and with the
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     8
 be provided or otherwise made available to, or used by, any
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
     9
 other person.  No title to or ownership of the software is
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    10
 hereby transferred.
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    11
"
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    12
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    13
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    14
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
TreeItem subclass:#TreeItemWithImage
1195
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    16
	instanceVariableNames:'icon'
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'Interface-Support'
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!TreeItemWithImage class methodsFor:'documentation'!
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
1717
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    24
copyright
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    25
"
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    26
 COPYRIGHT (c) 1999 eXept Software AG
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    27
              All Rights Reserved
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    28
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    29
 This software is furnished under a license and may be used
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    30
 only in accordance with the terms of that license and with the
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    32
 be provided or otherwise made available to, or used by, any
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    33
 other person.  No title to or ownership of the software is
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    34
 hereby transferred.
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    35
"
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    36
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    37
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    38
!
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    39
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
documentation
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    Like a regular TreeItem, but provides its own icon image.
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    [author:]
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
        Claus Gittinger (cg@exept)
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    [see also:]
1194
1a860b1214f6 comment
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
    49
        TreeItem FileSelectionItem
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
        SelectionInTree SelectionInTreeView
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    [instance variables:]
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
        image           <ImageOrForm>           my icon image
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    [class variables:]
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
"
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
! !
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
!TreeItemWithImage methodsFor:'accessing'!
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
1195
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    61
icon
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    62
    "return the value of the instance variable 'icon' (automatically generated)"
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
1195
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    64
    icon isNil ifTrue:[^ super icon].
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    65
    ^ icon
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    66
!
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
1195
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    68
icon:something
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    69
    "set the value of the instance variable 'icon' (automatically generated)"
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    70
1c2eb6d43e4a checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1194
diff changeset
    71
    icon := something.! !
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
!TreeItemWithImage class methodsFor:'documentation'!
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
version
1717
ad30640ff659 copyrights
Claus Gittinger <cg@exept.de>
parents: 1195
diff changeset
    76
    ^ '$Header: /cvs/stx/stx/libwidg2/TreeItemWithImage.st,v 1.4 2000-02-18 14:39:34 cg Exp $'
1193
e18387126713 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
! !