Skip to content

Commit 1e0ba07

Browse files
committed
do not use systemIcon or taskbarIcon but systemIconName and takbarIconName
1 parent 6f370ae commit 1e0ba07

15 files changed

+68
-37
lines changed

src/Spec2-Core/SpImageTableColumn.class.st

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ SpImageTableColumn class >> example [
2121

2222
SpTablePresenter new
2323
addColumn:
24-
((SpImageTableColumn title: 'Icon' evaluated: #systemIcon)
24+
((SpImageTableColumn
25+
title: 'Icon'
26+
evaluated: [ :aClass | self iconNamed: aClass systemIconName ])
2527
width: 50;
2628
yourself);
2729
addColumn: (SpStringTableColumn title: 'Name' evaluated: #name);
2830
items: self class environment allClasses;
2931
beResizable;
30-
open.
32+
open
3133
]
3234

3335
{ #category : #visiting }

src/Spec2-Core/SpWindowPresenter.class.st

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -545,11 +545,12 @@ SpWindowPresenter >> statusBar: aStatusBarPresenter [
545545

546546
{ #category : #TOREMOVE }
547547
SpWindowPresenter >> taskbarIcon [
548+
548549
^ self windowIcon
549550
ifNil: [
550-
self presenter
551-
ifNil: [ super taskbarIcon ]
552-
ifNotNil: #taskbarIcon ]
551+
self iconNamed: (self presenter
552+
ifNotNil: [ :aPresenter | aPresenter taskbarIconName ]
553+
ifNil: [ (self taskbarIconName) ]) ]
553554
]
554555

555556
{ #category : #private }

src/Spec2-Dialogs/SpSelectDialog.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ SpSelectDialog class >> example [
4646
label: 'Select a class';
4747
items: Smalltalk allClassesAndTraits;
4848
display: [ :each | each name ];
49-
displayIcon: [ :each | each systemIcon ];
49+
displayIcon: [ :each | self iconNamed: each systemIconName ];
5050
onAccept: [ :dialog | self inform: dialog presenter selectedItem asString ];
5151
openDialog
5252
]
@@ -60,7 +60,7 @@ SpSelectDialog class >> exampleModal [
6060
label: 'Select a class';
6161
items: Smalltalk allClassesAndTraits;
6262
display: [ :each | each name ];
63-
displayIcon: [ :each | each systemIcon ];
63+
displayIcon: [ :each | self iconNamed: each systemIconName ];
6464
openModal.
6565

6666
selection ifNotNil: [

src/Spec2-Examples/SpActionBarPresenter.extension.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ SpActionBarPresenter class >> example [
1414
"some settings to the list (to not have the presenter empty)"
1515
list
1616
items: Smalltalk allClassesAndTraits;
17-
displayIcon: [ :aClass | aClass systemIcon ];
17+
displayIcon: [ :aClass | self iconNamed: aClass systemIconName ];
1818
display: [ :aClass | aClass name ].
1919

2020
"now, we add some buttons to our action bar"

src/Spec2-Examples/SpButtonBarPresenter.extension.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ SpButtonBarPresenter class >> example [
1515
"some settings to the list (to not have the presenter empty)"
1616
list
1717
items: Smalltalk allClassesAndTraits;
18-
displayIcon: [ :aClass | aClass systemIcon ];
18+
displayIcon: [ :aClass | self iconNamed: aClass systemIconName ];
1919
display: [ :aClass | aClass name ].
2020

2121
"now, we add some buttons to our button bar"

src/Spec2-Examples/SpDemoFilteringListsPresenter.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ SpDemoFilteringListsPresenter >> initializePresenters [
3939
listWithPackages listPresenter
4040
display: [ :class | class name ];
4141
sortingBlock: [ :a : b | a name < b name ];
42-
displayIcon: [ :aClass | aClass systemIcon ].
42+
displayIcon: [ :aClass | self iconNamed: aClass systemIconName ].
4343

4444
listWithMethodsAlreadyFiltered := self newFilteringList.
4545
listWithMethodsAlreadyFiltered
@@ -49,7 +49,7 @@ SpDemoFilteringListsPresenter >> initializePresenters [
4949
listWithMethodsAlreadyFiltered listPresenter
5050
display: [ :class | class name ];
5151
sortingBlock: [ :a :b | a name < b name ];
52-
displayIcon: [ :aClass | aClass systemIcon ].
52+
displayIcon: [ :aClass | self iconNamed: aClass systemIconName ].
5353

5454
selectableList := self instantiate: SpFilteringSelectableListPresenter.
5555
selectableList items: self class environment allClasses.

src/Spec2-Examples/SpDemoListsPresenter.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ SpDemoListsPresenter >> iconFor: class [
8181
class hasErrorTest ifTrue: [ ^ self iconNamed: #testRed ].
8282
^ self iconNamed: #testNotRun ].
8383
class organization classComment ifEmpty: [ ^ self iconNamed: #uncommentedClass ].
84-
^ class systemIcon
84+
^ self iconNamed: class systemIconName
8585
]
8686

8787
{ #category : #initialization }

src/Spec2-Examples/SpDemoTablePresenter.class.st

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,15 @@ SpDemoTablePresenter >> initializePresenters [
4949
width: 20;
5050
yourself);
5151
addColumn:
52-
((SpImageTableColumn title: 'Icon' evaluated: #systemIcon)
52+
((SpImageTableColumn
53+
title: 'Icon'
54+
evaluated: [ :aClass | self iconNamed: aClass systemIconName ])
5355
width: 50;
5456
yourself);
5557
addColumn: (SpStringTableColumn title: 'Name' evaluated: #name);
56-
addColumn: (SpStringTableColumn title: 'Number of subclasses' evaluated: [ :class | class subclasses size asString ]);
58+
addColumn: (SpStringTableColumn
59+
title: 'Number of subclasses'
60+
evaluated: [ :class | class subclasses size asString ]);
5761
items: self class environment allClasses;
5862
beResizable
5963
]

src/Spec2-Examples/SpDemoTreeTablePresenter.class.st

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ SpDemoTreeTablePresenter >> initializePresenters [
2929
table1
3030
addColumn: (SpCompositeTableColumn new
3131
title: 'Classes';
32-
addColumn: ((SpImageTableColumn evaluated: #systemIcon)
32+
addColumn: ((SpImageTableColumn
33+
evaluated: [ :aClass | self iconNamed: aClass systemIconName ])
3334
width: 20;
3435
yourself);
3536
addColumn: (SpStringTableColumn evaluated: #name);

src/Spec2-Examples/SpFilteringListPresenter.extension.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SpFilteringListPresenter class >> exampleWithInitializedFilter [
3636
example := self new.
3737
example matchSubstring.
3838
example items: RBBrowserEnvironment default classes asArray.
39-
example displayIcon: [ :aClass | aClass systemIcon ].
39+
example displayIcon:[ :aClass | self iconNamed: aClass systemIconName ].
4040
example applyFilter: 'ZZ'.
4141
example open title:
4242
self name asString , ' example with filter'.

0 commit comments

Comments
 (0)