Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.115.mcz ==================== Summary ==================== Name: PreferenceBrowser-mt.115 Author: mt Time: 18 May 2021, 3:26:06.839468 pm UUID: 8f6a0f55-d68f-b140-8242-ebb88f3b2ca0 Ancestors: PreferenceBrowser-mt.114 Tweak the previous commit. Make the two new preferences be reflected in the preview world for the user to play around with. :-) =============== Diff against PreferenceBrowser-mt.114 =============== Item was added: + ----- Method: PreferenceWizardMorph>>addOrReplaceBrowser (in category 'initialization - playfield') ----- + addOrReplaceBrowser + + self + addOrReplaceTool: (ToolSet browse: Morph selector: #drawOn:) + named: #browser.! Item was added: + ----- Method: PreferenceWizardMorph>>addOrReplaceSenders (in category 'initialization - playfield') ----- + addOrReplaceSenders + + self + addOrReplaceTool: + (ToolSet + browseMessageSet: (SystemNavigation default allCallsOn: #negated) + name: 'Senders' translated + autoSelect: 'negated') + named: #senders! Item was added: + ----- Method: PreferenceWizardMorph>>addOrReplaceTool:named: (in category 'initialization - playfield') ----- + addOrReplaceTool: windowOrModel named: toolName + + | window | + window := windowOrModel isMorph + ifTrue: [windowOrModel] + ifFalse: [windowOrModel dependents detect: [:ea | ea isSystemWindow]]. + window + name: toolName; + makeUnclosable. + (previewWorld submorphNamed: window knownName) + ifNil: [previewWorld addMorph: window] + ifNotNil: [:existing | + window bounds: existing bounds. + previewWorld addMorph: window inFrontOf: existing. + existing makeClosable; delete].! Item was added: + ----- Method: PreferenceWizardMorph>>addOrReplaceWorkspace (in category 'initialization - playfield') ----- + addOrReplaceWorkspace + + self + addOrReplaceTool: (Workspace open contents: '3+4 "Select and hit [CMD]+[P]."') + named: #workspace.! Item was changed: ----- Method: PreferenceWizardMorph>>initializePreviewWorld (in category 'initialization - playfield') ----- initializePreviewWorld - | w1 w2 w3 | Preferences enable: #systemWindowEmbedOK. previewWorld := PasteUpMorph new hResizing: #spaceFill; vResizing: #spaceFill; viewBox: (0@0 corner: 500@500); layoutFrame: (LayoutFrame fractions: (0.3 @ 0 corner: 1.0 @ 1.0) offsets: (0@ titleMorph height corner: 0 @ buttonRowMorph height negated)); fillStyle: Project current world fillStyle; borderWidth: 2; borderColor: Color white; cornerStyle: (self hasLowPerformance ifTrue: [#square] ifFalse: [#rounded]); yourself. + self + addOrReplaceBrowser; + addOrReplaceSenders; + addOrReplaceWorkspace; + updateWindowBounds.! - w1 := (ToolSet browse: Morph selector: #drawOn:) dependents detect: [:ea | ea isSystemWindow]. - w2 := ToolSet browseMessageSet: (SystemNavigation default allCallsOn: #negated) name: 'Senders' translated autoSelect: 'negated'. - w3 := (Workspace new contents: '3+4 "Select and hit [CMD]+[P]."') openLabel: 'Workspace'. - - {w1. w2. w3} do: [:ea | - ea makeUnclosable. - previewWorld addMorph: ea]. - - self updateWindowBounds.! Item was changed: ----- Method: PreferenceWizardMorph>>toggleWorkspaceEmbedTranscript (in category 'actions - buttons') ----- toggleWorkspaceEmbedTranscript + Workspace embedTranscript: Workspace embedTranscript not. + self addOrReplaceWorkspace. + self changed: #stateWorkspaceEmbedTranscript.! - Workspace embedTranscript: Workspace embedTranscript not.! Item was changed: ----- Method: PreferenceWizardMorph>>toggleWorkspaceFileOutOnAccept (in category 'actions - buttons') ----- toggleWorkspaceFileOutOnAccept + Workspace fileOutOnAccept: Workspace fileOutOnAccept not. + self addOrReplaceWorkspace. + self changed: #stateWorkspaceFileOutOnAccept.! - Workspace fileOutOnAccept: Workspace fileOutOnAccept not.! |
Free forum by Nabble | Edit this page |