From f0536facb9041a4de840ba20ade4ad8bc95fdbb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A1n=20Morales=20Durand?= Date: Sun, 3 Nov 2024 00:29:22 +0100 Subject: [PATCH] Adapt application hooks to conform Spec application rules --- .../StSettingsAbstractPresenter.class.st | 2 +- .../StSettingsCategoryItemPresenter.class.st | 2 +- .../StSettingsMainPresenter.class.st | 21 +++---------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/NewTools-SettingsBrowser/StSettingsAbstractPresenter.class.st b/src/NewTools-SettingsBrowser/StSettingsAbstractPresenter.class.st index acf5657c..d2485266 100644 --- a/src/NewTools-SettingsBrowser/StSettingsAbstractPresenter.class.st +++ b/src/NewTools-SettingsBrowser/StSettingsAbstractPresenter.class.st @@ -28,5 +28,5 @@ StSettingsAbstractPresenter >> sectionTitleString [ StSettingsAbstractPresenter >> settingsTree [ "Answer the receiver's , the settings model" - ^ self application settingsTree. + ^ self application propertyAt: #settingsTree. ] diff --git a/src/NewTools-SettingsBrowser/StSettingsCategoryItemPresenter.class.st b/src/NewTools-SettingsBrowser/StSettingsCategoryItemPresenter.class.st index 3a8b082d..318b5db8 100644 --- a/src/NewTools-SettingsBrowser/StSettingsCategoryItemPresenter.class.st +++ b/src/NewTools-SettingsBrowser/StSettingsCategoryItemPresenter.class.st @@ -29,7 +29,7 @@ StSettingsCategoryItemPresenter >> defaultLayout [ StSettingsCategoryItemPresenter >> iconMapAt: aString [ "Answer a representing an icon selector matching aString" - ^ self application iconMapAt: aString + ^ (self application propertyAt: #iconMap) at: aString ] { #category : 'accessing' } diff --git a/src/NewTools-SettingsBrowser/StSettingsMainPresenter.class.st b/src/NewTools-SettingsBrowser/StSettingsMainPresenter.class.st index 712af624..ace24d73 100644 --- a/src/NewTools-SettingsBrowser/StSettingsMainPresenter.class.st +++ b/src/NewTools-SettingsBrowser/StSettingsMainPresenter.class.st @@ -28,12 +28,11 @@ Class { { #category : 'accessing' } StSettingsMainPresenter class >> application [ - self haltOnce. ^ StPharoApplication current - propertyAt: #settingsStree put: StSettingsTree new; - "propertyAt: #iconMap put: self iconMap;" + propertyAt: #settingsTree put: StSettingsTree new; + propertyAt: #iconMap put: self iconMap; styleSheet: self styleSheet; - "iconProvider: self iconProvider;" + iconProvider: StSettingsBrowserIconProvider new; yourself. ] @@ -60,13 +59,6 @@ StSettingsMainPresenter class >> iconMapAt: aString [ ifAbsent: [ #info ] ] -{ #category : 'accessing' } -StSettingsMainPresenter class >> iconProvider [ - - ^ iconProvider - ifNil: [ iconProvider := self newIconProvider ] -] - { #category : 'accessing' } StSettingsMainPresenter class >> initializeIconMap [ @@ -97,13 +89,6 @@ StSettingsMainPresenter class >> menuSettingsBrowserCommandOn: aBuilder [ order: 3 ] -{ #category : 'world menu' } -StSettingsMainPresenter class >> newApplication: anApplication [ - - self haltOnce. - super newApplication: anApplication -] - { #category : 'accessing - icons' } StSettingsMainPresenter class >> newIconProvider [