Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.256.mcz
==================== Summary ====================
Name: ST80-mt.256
Author: mt
Time: 13 July 2020, 11:48:31.957623 am
UUID: 354bbbf1-f342-ca44-92c6-f5556433cecc
Ancestors: ST80-mt.255
Makes MVC lists, window titles, menus, and "dialogs" aware of demo/hi-dpi mode.
=============== Diff against ST80-mt.255 ===============
Item was changed:
Paragraph subclass: #ListParagraph
instanceVariableNames: ''
+ classVariableNames: ''
- classVariableNames: 'ListStyle'
poolDictionaries: ''
category: 'ST80-Support'!
!ListParagraph commentStamp: '<historical>' prior: 0!
I represent a special type of Paragraph that is used in the list panes of a browser. I avoid all the composition done by more general Paragraphs, because I know the structure of my Text.!
Item was removed:
- ----- Method: ListParagraph class>>initialize (in category 'initialization') -----
- initialize
- "ListParagraph initialize"
- | aFont |
- "Allow different line spacing for lists"
- aFont := Preferences standardListFont.
- ListStyle := TextStyle fontArray: { aFont }.
- ListStyle gridForFont: 1 withLead: 1!
Item was changed:
----- Method: ListParagraph class>>standardListStyle (in category 'style') -----
standardListStyle
+
+ ^ (TextStyle fontArray: { Preferences standardListFont })
+ gridForFont: 1 withLead: 1;
+ yourself!
- ^ ListStyle!
Item was changed:
----- Method: ListParagraph class>>withArray:style: (in category 'instance creation') -----
withArray: anArray style: aTextStyleOrNil
"Convert an array of strings into a ListParagraph using the given TextStyle."
aTextStyleOrNil
+ ifNil: [^ (super withText: Text new style: self standardListStyle) withArray: anArray]
- ifNil: [^ (super withText: Text new style: ListStyle) withArray: anArray]
ifNotNil: [^ (super withText: Text new style: aTextStyleOrNil) withArray: anArray].
!
Item was changed:
----- Method: MVCProject>>jumpToProject (in category 'utilities') -----
jumpToProject
"Present a list of potential projects and enter the one selected.
We use mvcStartUpLeftFlush for possibly no longer valid historical reasons"
"Project current jumpToProject"
+ self jumpToSelection: (self buildJumpToMenu: CustomMenu new) startUp!
- self jumpToSelection: (self buildJumpToMenu: CustomMenu new) mvcStartUpLeftFlush!
Item was changed:
----- Method: PopUpMenu>>computeLabelParagraph (in category '*ST80-Support') -----
computeLabelParagraph
"Answer a Paragraph containing this menu's labels, one per line and centered."
+ ^ Paragraph withText: labelString asText style: self class standardMenuStyle!
- ^ Paragraph withText: labelString asText style: MenuStyle!
Item was removed:
- ----- Method: PopUpMenu>>mvcStartUpLeftFlush (in category '*ST80-Menus') -----
- mvcStartUpLeftFlush
- "Build and invoke this menu with no initial selection. By Jerry Archibald, 4/01.
- If in MVC, align menus items with the left margin.
- Answer the selection associated with the menu item chosen by the user or nil if none is chosen.
- The mechanism for getting left-flush appearance in mvc leaves a tiny possibility for misadventure: if the user, in mvc, puts up the jump-to-project menu, then hits cmd period while it is up, then puts up a second jump-to-project menu before dismissing or proceeding through the debugger, it's possible for mvc popup-menus thereafter to appear left-aligned rather than centered; this very unlikely condition can be cleared by evaluating 'PopUpMenu alignment: 2'"
-
- | saveAlignment |
- saveAlignment := PopUpMenu alignment.
- PopUpMenu leftFlush.
- ^[self startUp] ensure:
- [PopUpMenu alignment: saveAlignment]!
Item was changed:
View subclass: #StandardSystemView
instanceVariableNames: 'labelFrame labelText isLabelComplemented savedSubViews minimumSize maximumSize collapsedViewport expandedViewport labelBits windowBits bitsValid updatablePanes'
+ classVariableNames: 'CacheBits'
- classVariableNames: 'CacheBits LabelStyle'
poolDictionaries: ''
category: 'ST80-Support'!
!StandardSystemView commentStamp: '<historical>' prior: 0!
I represent a view that has a label above its top left corner. The text in the label identifies the kind of view. In addition to a label, I add control over the maximum and minimum size of the display box of my instance. My default controller is StandardSystemController. The elements of ScheduledControllers, the sole instance of ControlManager, are usually controllers for instances of me.!
Item was changed:
----- Method: StandardSystemView class>>initialize (in category 'class initialization') -----
initialize "StandardSystemView initialize"
+ self doCacheBits.!
- self doCacheBits.
- self setLabelStyle!
Item was removed:
- ----- Method: StandardSystemView class>>setLabelStyle (in category 'class initialization') -----
- setLabelStyle
- | aFont |
- "StandardSystemView setLabelStyle"
- aFont := Preferences windowTitleFont.
- LabelStyle := TextStyle fontArray: { aFont }.
- LabelStyle gridForFont: 1 withLead: 0!
Item was added:
+ ----- Method: StandardSystemView class>>standardLabelStyle (in category 'class initialization') -----
+ standardLabelStyle
+
+ ^ (TextStyle fontArray: { Preferences windowTitleFont })
+ gridForFont: 1 withLead: 0;
+ yourself!
Item was changed:
----- Method: StandardSystemView>>label: (in category 'label access') -----
label: aString
"Set aString to be the receiver's label."
labelText := Paragraph
withText: (Text fromString: ((aString == nil or: [aString isEmpty])
ifTrue: ['Untitled' copy]
ifFalse: [aString]))
+ style: self class standardLabelStyle.
- style: LabelStyle.
insetDisplayBox == nil ifTrue: [^ self]. "wait for further initialization"
self setLabelRegion!
Item was changed:
----- Method: StandardSystemView>>labelHeight (in category 'label access') -----
labelHeight
+ ^ ((self class standardLabelStyle fontAt: 1) height + 4) max: 20!
- ^ ((LabelStyle fontAt: 1) height + 4) max: 20!
Patrick Rein uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-pre.262.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-pre.262
Author: pre
Time: 9 July 2020, 3:52:09.108909 pm
UUID: 55e57017-8d67-424f-9a7b-2b64ed8af8af
Ancestors: ToolBuilder-Morphic-tpr.261, ToolBuilder-Morphic-TheresaHMartenK.261
Merge of ToolBuilder-Morphic-TheresaHMartenK.261
The current implementation searches for the supplied answer in the valueList and if found returns the value at the found index in the valueList which of course is the supplied answer. However from the behaviour that gets mimicked you would expect the implementation to look for the suppliedAnswer in the labelList - the same as you click on the label and not on its connected value. Additionally this produces less readable / understandable code compared to supplying the label, especially if the value happens to be a block.
With the new implementation, the answer is searched in the labelList, and the returned value is the coresponding value from the valueList.
=============== Diff against ToolBuilder-Morphic-tpr.261 ===============
Item was changed:
----- Method: MorphicUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----
chooseFrom: labelList values: valueList lines: linesArray title: aString
"Choose an item from the given list. Answer the selected item."
| index |
self askForProvidedAnswerTo: aString ifSupplied: [:answer |
(answer = #cancel or: [answer isNil]) ifTrue: [^ nil].
+ ^ valueList at: (labelList indexOf: answer) ifAbsent: [
- ^ valueList at: (valueList indexOf: answer) ifAbsent: [
answer isNumber
ifTrue: [valueList at: answer ifAbsent: [nil]]
ifFalse: [nil]]].
index := self chooseFrom: labelList lines: linesArray title: aString.
^ index = 0
ifTrue: [ nil ]
ifFalse: [ valueList at: index ]!
Patrick Rein uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-TheresaHMartenK.261.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-TheresaHMartenK.261
Author: TheresaHMartenK
Time: 20 June 2020, 4:04:09.471561 pm
UUID: ec0bd065-4cc8-7d48-b940-4bf5a0f4a7cf
Ancestors: ToolBuilder-Morphic-mt.260
The current implementation searches for the supplied answer in the valueList and if found returns the value at the found index in the valueList which of course is the supplied answer. However from the behaviour that gets mimicked you would expect the implementation to look for the suppliedAnswer in the labelList - the same as you click on the label and not on its connected value. Additionally this produces less readable / understandable code compared to supplying the label, especially if the value happens to be a block.
With the new implementation, the answer is searched in the labelList, and the returned value is the coresponding value from the valueList.
=============== Diff against ToolBuilder-Morphic-mt.260 ===============
Item was changed:
----- Method: MorphicUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----
chooseFrom: labelList values: valueList lines: linesArray title: aString
"Choose an item from the given list. Answer the selected item."
| index |
self askForProvidedAnswerTo: aString ifSupplied: [:answer |
(answer = #cancel or: [answer isNil]) ifTrue: [^ nil].
+ ^ valueList at: (labelList indexOf: answer) ifAbsent: [
- ^ valueList at: (valueList indexOf: answer) ifAbsent: [
answer isNumber
ifTrue: [valueList at: answer ifAbsent: [nil]]
ifFalse: [nil]]].
index := self chooseFrom: labelList lines: linesArray title: aString.
^ index = 0
ifTrue: [ nil ]
ifFalse: [ valueList at: index ]!
Patrick Rein uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-TheresaHMartenK.60.mcz
==================== Summary ====================
Name: ToolBuilder-MVC-TheresaHMartenK.60
Author: TheresaHMartenK
Time: 20 June 2020, 4:32:44.419561 pm
UUID: ce7849e7-d47c-434e-8bbd-f6ec2b896a4c
Ancestors: ToolBuilder-MVC-mt.59
Same reason as: ToolBuilder-Morphic-TheresaHMartenK.261
Copy:
The current implementation searches for the supplied answer in the valueList and if found returns the value at the found index in the valueList which of course is the supplied answer. However from the behaviour that gets mimicked you would expect the implementation to look for the suppliedAnswer in the labelList - the same as you click on the label and not on its connected value. Additionally this produces less readable / understandable code compared to supplying the label, especially if the value happens to be a block.
With the new implementation, the answer is searched in the labelList, and the returned value is the coresponding value from the valueList.
=============== Diff against ToolBuilder-MVC-mt.59 ===============
Item was changed:
----- Method: MVCUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----
chooseFrom: labelList values: valueList lines: linesArray title: aString
"Choose an item from the given list. Answer the selected item."
| menu |
self askForProvidedAnswerTo: aString ifSupplied: [:answer |
(answer = #cancel or: [answer isNil]) ifTrue: [^ nil].
+ ^ valueList at: (labelList indexOf: answer) ifAbsent: [
- ^ valueList at: (valueList indexOf: answer) ifAbsent: [
answer isNumber
ifTrue: [valueList at: answer ifAbsent: [nil]]
ifFalse: [nil]]].
menu := SelectionMenu labels: labelList lines: linesArray selections: valueList.
^ aString
ifEmpty: [menu startUp]
ifNotEmpty: [menu startUpWithCaption: aString]!
Patrick Rein uploaded a new version of CommandLine to project The Trunk:
http://source.squeak.org/trunk/CommandLine-TheresaHMartenK.17.mcz
==================== Summary ====================
Name: CommandLine-TheresaHMartenK.17
Author: TheresaHMartenK
Time: 20 June 2020, 4:33:21.503561 pm
UUID: 1e990100-46c5-7b4a-966c-d1908837d2ca
Ancestors: CommandLine-mt.16
Same reason as: ToolBuilder-Morphic-TheresaHMartenK.261
Copy:
The current implementation searches for the supplied answer in the valueList and if found returns the value at the found index in the valueList which of course is the supplied answer. However from the behaviour that gets mimicked you would expect the implementation to look for the suppliedAnswer in the labelList - the same as you click on the label and not on its connected value. Additionally this produces less readable / understandable code compared to supplying the label, especially if the value happens to be a block.
With the new implementation, the answer is searched in the labelList, and the returned value is the coresponding value from the valueList.
=============== Diff against CommandLine-mt.16 ===============
Item was changed:
----- Method: DummyUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----
chooseFrom: labelList values: valueList lines: linesArray title: aString
self askForProvidedAnswerTo: aString ifSupplied: [:answer |
(answer = #cancel or: [answer isNil]) ifTrue: [^ nil].
+ ^ valueList at: (labelList indexOf: answer) ifAbsent: [
- ^ valueList at: (valueList indexOf: answer) ifAbsent: [
answer isNumber
ifTrue: [valueList at: answer ifAbsent: [nil]]
ifFalse: [nil]]].
^ valueList first!
tim Rowledge uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-tpr.383.mcz
==================== Summary ====================
Name: KernelTests-tpr.383
Author: tpr
Time: 2 July 2020, 10:24:36.600711 pm
UUID: cb4cc7c5-a318-4424-93dd-1414a73dbc32
Ancestors: KernelTests-tonyg.382
Make the AllocationTest work by preventing the requested free space size (in #setFreeSpaceLimi....) from exceeding SmallInteger>maxVal and thereby failing the vmParameter primitive's limit.
=============== Diff against KernelTests-tonyg.382 ===============
Item was changed:
----- Method: AllocationTest>>setFreeSpaceLimitOf:around: (in category 'support') -----
setFreeSpaceLimitOf: bytes around: aBlock
"Attempt to evaluate aBlock with a limit of the requested ammount
of free old space, restoring the extant limit after the evaluation."
| extantLimit |
extantLimit := Smalltalk vmParameterAt: 67.
+ Smalltalk vmParameterAt: 67 put: ((Smalltalk vmParameterAt: 1) + bytes asInteger min: SmallInteger maxVal).
- Smalltalk vmParameterAt: 67 put: (Smalltalk vmParameterAt: 1) + bytes asInteger.
^aBlock ensure: [Smalltalk vmParameterAt: 67 put: extantLimit]!
Eliot Miranda uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-eem.440.mcz
==================== Summary ====================
Name: Compiler-eem.440
Author: eem
Time: 1 July 2020, 10:05:10.178038 am
UUID: a39848b4-1bc8-4b31-93f8-e4f343d1400b
Ancestors: Compiler-mt.439
Improve slightly the EncoderForSistaV1 class comment specifying the SistaV1 bytecode set in the light of recent discussion.
=============== Diff against Compiler-mt.439 ===============
Item was changed:
BytecodeEncoder subclass: #EncoderForSistaV1
(excessive size, no diff calculated)