#REFACTORING by exept
class: AbstractSettingsApplication::DisplaySettingsAppl
changed:
#clipEncodingList
#initialize
--- a/AbstractSettingsApplication.st Sat Feb 22 00:12:03 2020 +0100
+++ b/AbstractSettingsApplication.st Sat Feb 22 00:17:32 2020 +0100
@@ -4701,13 +4701,6 @@
!AbstractSettingsApplication::DisplaySettingsAppl methodsFor:'aspects'!
clipEncodingList
-
- clipEncodingList isNil ifTrue:[
- clipEncodingList := (resources array:self class clipEncodingStrings) asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ clipEncodingList addDependent:self.
-"/ clipEncodingList onChangeSend:#clipEncodingListChanged to:self.
- ].
^ clipEncodingList.
!
@@ -4879,10 +4872,14 @@
]
].
- clipEncodingListSelection := ValueHolder with:(self class clipEncodingSyms indexOf:screen clipboardEncoding ifAbsent:1).
+ clipEncodingListSelection :=
+ (self class clipEncodingSyms indexOf:screen clipboardEncoding ifAbsent:1)
+ asValue.
clipEncodingListSelection onChangeSend:#updateModifiedChannel to:self.
- deepIcons := ValueHolder with:(screen supportsDeepIcons).
+ clipEncodingList := (resources array:self class clipEncodingStrings) asValue.
+
+ deepIcons := (screen supportsDeepIcons) asValue.
deepIcons onChangeSend:#updateModifiedChannel to:self.
ditherList := ValueHolder new.
@@ -4894,12 +4891,12 @@
].
ditherListSelection onChangeSend:#updateModifiedChannel to:self.
- ditherSymsNotNil := ValueHolder with:(ditherSyms notNil).
-
- enableVMWareDrawingBugWorkaround := ValueHolder with:false.
+ ditherSymsNotNil := (ditherSyms notNil) asValue.
+
+ enableVMWareDrawingBugWorkaround := false asValue.
enableVMWareDrawingBugWorkaround onChangeSend:#updateModifiedChannel to:self.
- isColorMonitor := ValueHolder with:(screen hasColors).
+ isColorMonitor := (screen hasColors) asValue.
isColorMonitor onChangeSend:#updateModifiedChannel to:self.
monitorList := (resources array:(sizeInfos collectColumn:1)) asList.
@@ -4909,7 +4906,7 @@
monitorSelection onChangeSend:#updateModifiedChannel to:self.
monitorSelection changed.
- maxCopyBufferSize := ValueHolder with:(8*1024*1024).
+ maxCopyBufferSize := (8*1024*1024) asValue.
maxCopyBufferSize addDependent:self.
maxCopyBufferSize changed.
maxCopyBufferSize onChangeSend:#updateModifiedChannel to:self.
@@ -4920,37 +4917,37 @@
with:screen visualType
with:screen serverVendor).
- sizeX := ValueHolder with:(screen widthInMillimeter).
+ sizeX := (screen widthInMillimeter) asValue.
sizeX addDependent:self.
sizeX changed.
sizeX onChangeSend:#updateModifiedChannel to:self.
- sizeY := ValueHolder with:(screen heightInMillimeter).
+ sizeY := (screen heightInMillimeter) asValue.
sizeY addDependent:self.
sizeY changed.
sizeY onChangeSend:#updateModifiedChannel to:self.
- useFixGrayPalette := ValueHolder with:(screen fixGrayColors notNil).
+ useFixGrayPalette := (screen fixGrayColors notNil) asValue.
useFixGrayPalette onChangeSend:#updateModifiedChannel to:self.
- useFixGrayPaletteLabel := ValueHolder with:(resources string:'Use Fix Gray Color Palette %1' with:'(32)').
-
- useFixPalette := ValueHolder with:(screen fixColors notNil).
+ useFixGrayPaletteLabel := (resources string:'Use Fix Gray Color Palette %1' with:'(32)') asValue.
+
+ useFixPalette := (screen fixColors notNil) asValue.
useFixPalette onChangeSend:#updateModifiedChannel to:self.
- useFixPaletteLabel := ValueHolder with:(resources string:'Use Fix Color Palette %1' with:'(4x8x4)').
-
- usedHeight := ValueHolder with:(screen usableHeight).
+ useFixPaletteLabel := (resources string:'Use Fix Color Palette %1' with:'(4x8x4)') asValue.
+
+ usedHeight := (screen usableHeight) asValue.
usedHeight addDependent:self.
usedHeight changed.
usedHeight onChangeSend:#updateModifiedChannel to:self.
- usedWidth := ValueHolder with:(screen usableWidth).
+ usedWidth := (screen usableWidth) asValue.
usedWidth addDependent:self.
usedWidth changed.
usedWidth onChangeSend:#updateModifiedChannel to:self.
- visualIsPseudoColor := ValueHolder with:(screen visualType == #PseudoColor).
+ visualIsPseudoColor := (screen visualType == #PseudoColor) asValue.
visualIsPseudoColor onChangeSend:#updateModifiedChannel to:self.
"Modified: / 08-02-2017 / 00:30:30 / cg"