Christoph Thiede uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-ct.997.mcz
==================== Summary ====================
Name: Collections-ct.997
Author: ct
Time: 25 March 2022, 8:08:33.46961 pm
UUID: e320783c-fb7c-2f4d-9ea4-fe6152d9c677
Ancestors: Collections-mt.995
Merges SparseLargeTable enumerate+tests.1.cs:
* Overrides #withIndexDo: to start from base index only
* Adds #sparseElementsAndIndicesDo: for efficient iterating over all non-default values
=============== Diff against Collections-mt.995 ===============
Item was added:
+ ----- Method: SparseLargeTable>>sparseElementsAndIndicesDo: (in category 'accessing') -----
+ sparseElementsAndIndicesDo: binaryBlock
+ "Evaluate binaryBlock for each element and index in the receiver that has a non-default value."
+
+ 1 to: self basicSize do: [:chunkIndex |
+ (self basicAt: chunkIndex) ifNotNil: [:chunk |
+ chunk withIndexDo: [:element :innerIndex |
+ element ~= defaultValue ifTrue: [
+ binaryBlock value: element value: innerIndex + base - 1 + (chunkIndex - 1 * chunkSize)]]]].!
Item was added:
+ ----- Method: SparseLargeTable>>withIndexDo: (in category 'enumerating') -----
+ withIndexDo: binaryBlock
+
+ self base to: self size do: [:index |
+ binaryBlock
+ value: (self at: index)
+ value: index].!
Christoph Thiede uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-ct.469.mcz
==================== Summary ====================
Name: EToys-ct.469
Author: ct
Time: 25 March 2022, 7:56:46.277407 pm
UUID: cf9e5a92-3dac-a348-b4e2-b4bc36867fc2
Ancestors: EToys-mt.468
Complements Morphic-ct.1944.
=============== Diff against EToys-mt.468 ===============
Item was removed:
- ----- Method: Morph>>aboutToBeGrownViaHalo (in category '*Etoys-Squeakland-halo notification') -----
- aboutToBeGrownViaHalo
- "The receiver is about to be grown via the halo."!
Item was removed:
- ----- Method: Morph>>aboutToBeRotatedViaHalo (in category '*Etoys-Squeakland-halo notification') -----
- aboutToBeRotatedViaHalo
- "The receiver is about to be rotated via the halo."!
Item was removed:
- ----- Method: Morph>>aboutToBeScaledViaHalo (in category '*Etoys-Squeakland-halo notification') -----
- aboutToBeScaledViaHalo
- "The receiver is about to be scaled via the halo."!
Christoph Thiede uploaded a new version of Collections to project The Treated Inbox:
http://source.squeak.org/treated/Collections-ct.995.mcz
==================== Summary ====================
Name: Collections-ct.995
Author: ct
Time: 12 March 2022, 2:46:24.947632 am
UUID: 9c697903-e2ac-2244-85cb-5234b3a3c9ca
Ancestors: Collections-mt.994
Accelerates Symbol condenseNewSymbols if there are no new symbols.
=============== Diff against Collections-mt.994 ===============
Item was changed:
----- Method: Symbol class>>condenseNewSymbols (in category 'private') -----
condenseNewSymbols
"Move all symbols from NewSymbols to SymbolTable, and compact SymbolTable."
| originalNewSymbols originalSymbolTable newNewSymbols newSymbolTable |
+ originalNewSymbols := NewSymbols ifEmpty: [^ self].
- originalNewSymbols := NewSymbols.
originalSymbolTable := SymbolTable.
newNewSymbols := WeakSet new.
newSymbolTable := originalSymbolTable copy
addAll: originalNewSymbols;
compact;
yourself.
originalNewSymbols == NewSymbols ifFalse: [
"Some other process has modified the symbols. Try again."
^self condenseNewSymbols ].
NewSymbols := newNewSymbols.
SymbolTable := newSymbolTable!
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.1943.mcz
==================== Summary ====================
Name: Morphic-ct.1943
Author: ct
Time: 24 March 2022, 8:16:43.005856 pm
UUID: e89b8b18-3f00-4a4f-b3d7-a779d2924240
Ancestors: Morphic-mt.1942
Marks "mini editors" for StringMorphs as plain-text-only. Thanks to Marcel for the pointer!
=============== Diff against Morphic-mt.1942 ===============
Item was changed:
----- Method: StringMorph>>launchMiniEditor: (in category 'editing') -----
launchMiniEditor: evt
| textMorph |
hasFocus := true. "Really only means edit in progress for this morph"
textMorph := StringMorphEditor new contentsAsIs: contents.
textMorph font: self fontToUse.
textMorph color: self color.
+ textMorph plainTextOnly: true.
textMorph innerBounds: self innerBounds.
self addMorphFront: textMorph.
evt hand newKeyboardFocus: textMorph.
textMorph editor selectFrom: 1 to: textMorph paragraph text string size!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1330.mcz
==================== Summary ====================
Name: System-mt.1330
Author: mt
Time: 23 March 2022, 10:28:17.357127 am
UUID: cd055bb3-fade-4447-89b7-6b3d41ea305c
Ancestors: System-mt.1329
For pref category lookup, use #sameAs: not #= to ignore letter case.
=============== Diff against System-mt.1329 ===============
Item was changed:
----- Method: Preferences class>>preferencesInCategory: (in category 'support') -----
preferencesInCategory: aCategorySymbol
"Answer a list of Preference objects that reside in the given category."
^ self allPreferences select: [ :aPreference |
+ aPreference categoryList anySatisfy: [ :aCategory |
+ aCategory sameAs: aCategorySymbol ]]!
- aPreference categoryList includes: aCategorySymbol ]!
Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:
http://source.squeak.org/trunk/PreferenceBrowser-mt.139.mcz
==================== Summary ====================
Name: PreferenceBrowser-mt.139
Author: mt
Time: 23 March 2022, 10:22:57.915972 am
UUID: 801aa3e9-251d-4b72-9809-7e44ebf4e9ed
Ancestors: PreferenceBrowser-mt.138
Some visual clean-up and changes in preference browser:
- Merge lowercase categories into uppercase ones
- Show number of prefs per category
- Correct list margin in prefs list
- Cache category list for smooth interaction
- Use default button color
- Fixes line breaks several balloon texts
=============== Diff against PreferenceBrowser-mt.138 ===============
Item was changed:
----- Method: PBPreferenceButtonMorph>>initializeLayout (in category 'initialization') -----
initializeLayout
self layoutPolicy: TableLayout new;
beTransparent;
+ layoutInset: PluggableListMorph listMargins;
- layoutInset: 0;
cellGap: 0;
listCentering: #topLeft;
cellPositioning: #topLeft;
listDirection: #topToBottom;
hResizing: #spaceFill;
vResizing: #shrinkWrap. !
Item was changed:
Model subclass: #PreferenceBrowser
+ instanceVariableNames: 'selectedCategoryIndex selectedPreference searchPattern searchResults lastExecutedSearch preferences title categoryList categoryLabelList'
- instanceVariableNames: 'selectedCategoryIndex selectedPreference searchPattern searchResults lastExecutedSearch preferences title'
classVariableNames: ''
poolDictionaries: ''
category: 'PreferenceBrowser'!
Item was added:
+ ----- Method: PreferenceBrowser>>categoryLabelList (in category 'accessing') -----
+ categoryLabelList
+
+ ^ categoryLabelList ifNil: [categoryLabelList := self categoryList
+ collect: [:category | '{1} ({2})' format: {
+ category.
+ self numPreferencesInCategory: category }]]!
Item was changed:
----- Method: PreferenceBrowser>>categoryList (in category 'accessing') -----
categoryList
+
+ ^ categoryList ifNil: [categoryList := OrderedCollection new
- ^OrderedCollection new
add: self allCategoryLabel;
+ addAll: (preferences categoryList collect: [:ea | ea capitalized]) sorted;
- addAll: preferences categoryList sorted;
add: self searchResultsCategoryLabel;
+ yourself].
- yourself.
!
Item was changed:
----- Method: PreferenceBrowser>>defaultSelected (in category 'preferences search') -----
defaultSelected
(Project uiManager
+ confirm: 'Do you really want to restore the default preferences?\\If you want to keep the current state, you have to save it first.' translated withCRs
+ title: 'Restore Default Preferences')
- confirm: 'Do you really want to restore the default\preferences?\\If you want to keep the current state,\you have to save it first.' translated withCRs
- title: 'Restore Preferences')
ifFalse: [^ self].
Preferences chooseInitialSettings.!
Item was changed:
----- Method: PreferenceBrowser>>loadFromDiskSelected (in category 'preferences search') -----
loadFromDiskSelected
(Project uiManager
+ confirm: 'Do you really want to restore your personal preferences from disk?\\The file ''my.prefs'' will be loaded.' translated withCRs
+ title: 'Restore Preferences from Disk' translated) ifFalse: [^ self].
- confirm: 'Do you really want to restore your\personal preferences from disk?\\The file ''my.prefs'' will be loaded.' translated withCRs
- title: 'Restore Preferences from Disk') ifFalse: [^ self].
preferences restorePreferencesFromDisk!
Item was changed:
----- Method: PreferenceBrowser>>loadSelected (in category 'preferences search') -----
loadSelected
(Project uiManager
+ confirm: 'Do you really want to restore your personal preferences?' translated
- confirm: 'Do you really want to restore\your personal preferences?' translated withCRs
title: 'Restore Preferences') ifFalse: [^ self].
preferences restorePersonalPreferences.!
Item was added:
+ ----- Method: PreferenceBrowser>>numPreferencesInCategory: (in category 'accessing') -----
+ numPreferencesInCategory: aCategory
+
+ aCategory = self allCategoryLabel
+ ifTrue: [^ preferences allPreferences size].
+ aCategory = self searchResultsCategoryLabel
+ ifTrue: [^ self searchResults size].
+ ^ (preferences preferencesInCategory: aCategory) size!
Item was changed:
----- Method: PreferenceBrowser>>saveSelected (in category 'preferences search') -----
saveSelected
(Project uiManager
+ confirm: 'Do you really want to overwrite your personal preferences?' translated
- confirm: 'Do you really want to overwrite\your personal preferences?' translated withCRs
title: 'Save Preferences') ifFalse: [^ self].
preferences savePersonalPreferences.!
Item was changed:
----- Method: PreferenceBrowser>>saveToDiskSelected (in category 'preferences search') -----
saveToDiskSelected
(Project uiManager
+ confirm: 'Do you really want to overwrite your personal preferences on disk?\\The file ''my.prefs'' will be updated.' translated withCRs
+ title: 'Save Preferences to Disk' translated) ifFalse: [^ self].
- confirm: 'Do you really want to overwrite your\personal preferences on disk?\\The file ''my.prefs'' will be updated.' translated withCRs
- title: 'Save Preferences to Disk') ifFalse: [^ self].
preferences storePreferencesToDisk!
Item was changed:
----- Method: PreferenceBrowser>>searchPreferencesFor: (in category 'preferences search') -----
searchPreferencesFor: pattern
| result |
result := pattern asString asLowercase withBlanksTrimmed.
result ifEmpty: [^self].
searchResults := self allPreferences select: [:aPreference |
((aPreference name includesSubstring: result caseSensitive: false)
or: [aPreference helpString includesSubstring: result caseSensitive: false])
+ or: [aPreference codeString includesSubstring: result caseSensitive: false] ].
+ self updateSearchResultsLabel.
- or: [aPreference codeString includesSubstring: result caseSensitive: false] ].
self selectSearchResultsCategory.
self lastExecutedSearch: pattern.
!
Item was changed:
----- Method: PreferenceBrowser>>selectedCategoryPreferences (in category 'accessing') -----
selectedCategoryPreferences
self allCategorySelected
ifTrue: [^self allPreferences].
self searchResultsCategorySelected
ifTrue: [^self searchResults].
+ ^ self selectedCategory
+ ifNil: [#()]
+ ifNotNil: [:cat | self preferencesInCategory: cat]
- ^self preferencesInCategory: self selectedCategory.
!
Item was added:
+ ----- Method: PreferenceBrowser>>updateSearchResultsLabel (in category 'user interface') -----
+ updateSearchResultsLabel
+
+ self categoryLabelList
+ at: self categoryLabelList size
+ put: ('{1} ({2})' format: {
+ self searchResultsCategoryLabel.
+ self searchResults size }).
+ self changed: #categoryLabelList.!
Item was changed:
----- Method: PreferenceBrowserMorph>>basicButton (in category 'submorphs - buttons') -----
basicButton
^ PluggableButtonMorph new
model: self model;
- offColor: self paneColor;
hResizing: #spaceFill;
vResizing: #spaceFill;
yourself!
Item was changed:
----- Method: PreferenceBrowserMorph>>helpButton (in category 'submorphs - buttons') -----
helpButton
^helpButton ifNil:
[helpButton := self basicButton
label: 'help' translated;
+ setBalloonText: 'Click here to get some hints on use of this Preferences Panel' translated;
- setBalloonText:
- 'Click here to get some hints on use of this Preferences ',
- 'Panel' translated;
action: #helpSelected]!
Item was changed:
----- Method: PreferenceBrowserMorph>>loadButton (in category 'submorphs - buttons') -----
loadButton
^loadButton ifNil:
[loadButton := self basicButton
label: 'load' translated;
action: #loadSelected;
+ setBalloonText: 'Click here to reset all the preferences to their values in your Personal Preferences.' translated]!
- setBalloonText:
- 'Click here to reset all the preferences to their values ',
- 'in your Personal Preferences.' translated]!
Item was changed:
----- Method: PreferenceBrowserMorph>>loadFromDiskButton (in category 'submorphs - buttons') -----
loadFromDiskButton
^loadFromDiskButton ifNil:
[loadFromDiskButton := self basicButton
label: 'load from disk' translated;
action: #loadFromDiskSelected;
+ setBalloonText: 'Click here to load all the preferences from their saved values on disk.' translated]!
- setBalloonText:
- 'Click here to load all the preferences from ',
- 'their saved values on disk.' translated]!
Item was changed:
----- Method: PreferenceBrowserMorph>>newButtonRow (in category 'submorphs - buttons') -----
newButtonRow
^BorderedMorph new
color: Color transparent;
borderWidth: 0;
+ cellGap: ToolBuilder default panelSpacing;
- cellGap: 2;
layoutPolicy: TableLayout new;
listDirection: #leftToRight;
listCentering: #topLeft;
cellPositioning: #topLeft;
on: #mouseEnter send: #paneTransition: to: self;
on: #mouseLeave send: #paneTransition: to: self;
addMorphBack: self defaultButton;
addMorphBack: self newSeparator;
addMorphBack: self saveButton;
addMorphBack: self loadButton;
addMorphBack: self newSeparator;
addMorphBack: self saveToDiskButton;
addMorphBack: self loadFromDiskButton;
addMorphBack: self newSeparator;
addMorphBack: self themeButton;
addMorphBack: self newTransparentFiller;
addMorphBack: self helpButton;
yourself.!
Item was changed:
----- Method: PreferenceBrowserMorph>>newCategoryList (in category 'submorphs - category list') -----
newCategoryList
^(PluggableListMorph
on: self model
+ list: #categoryLabelList
- list: #categoryList
selected: #selectedCategoryIndex
changeSelected: #selectedCategoryIndex:)
hResizing: #spaceFill;
vResizing: #spaceFill;
layoutFrame: (LayoutFrame fractions: (0@0 corner: 0.25@1));
yourself.!
Item was changed:
----- Method: PreferenceBrowserMorph>>newSeparator (in category 'submorphs - buttons') -----
newSeparator
+ ^ Morph new
+ color: Color transparent;
+ width: (5 * RealEstateAgent scaleFactor) truncated;
- ^BorderedMorph new
- borderWidth: 2;
- borderColor: Color transparent;
- color: self paneColor;
- hResizing: #rigid;
- width: 5;
vResizing: #spaceFill;
yourself!
Item was changed:
----- Method: PreferenceBrowserMorph>>saveButton (in category 'submorphs - buttons') -----
saveButton
^saveButton ifNil:
[saveButton := self basicButton
label: 'save' translated;
action: #saveSelected;
+ setBalloonText: 'Click here to save the current constellation of Preferences settings as your personal defaults; you can get them all reinstalled with a single gesture by clicking the "Restore my Personal Preferences".' translated]!
- setBalloonText:
- 'Click here to save the current constellation of Preferences ',
- 'settings as your personal defaults; you can get them all ',
- 'reinstalled with a single gesture by clicking the "Restore ',
- 'my Personal Preferences".' translated]!
Item was changed:
----- Method: PreferenceBrowserMorph>>saveToDiskButton (in category 'submorphs - buttons') -----
saveToDiskButton
^saveToDiskButton ifNil:
[saveToDiskButton := self basicButton
label: 'save to disk' translated;
action: #saveToDiskSelected;
+ setBalloonText: 'Click here to save the current constellation of Preferences settings to a file; you can get them all reinstalled with a single gesture by clicking "Restore Settings From Disk".' translated]!
- setBalloonText:
- 'Click here to save the current constellation of Preferences ',
- 'settings to a file; you can get them all reinstalled with a ',
- 'single gesture by clicking "Restore Settings From Disk".'
- translated]!
Item was changed:
----- Method: PreferenceBrowserMorph>>updateSelectedCategoryPreferences (in category 'updating') -----
updateSelectedCategoryPreferences
+
+ | newPanel |
+ self preferenceList vScrollBarValue: 0.
+ self preferenceList scroller removeAllMorphs.
+
+ (self model allCategorySelected or: [self model searchResultsCategorySelected])
+ ifTrue: [Cursor wait showWhile: [newPanel := self newPreferenceListInnerPanel]]
+ ifFalse: [newPanel := self newPreferenceListInnerPanel].
+
+ self preferenceList scroller addMorphBack: newPanel.
+ self adoptPaneColor: self paneColor.!
- Cursor wait showWhile:
- [self preferenceList
- hScrollBarValue: 0;
- vScrollBarValue: 0.
- self preferenceList scroller removeAllMorphs.
- self preferenceList scroller addMorphBack: self newPreferenceListInnerPanel.
- self adoptPaneColor: self paneColor]!