<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Very nice! :-)</p>
<p><br>
</p>
<p>> <span style="font-size:12pt">- Merge lowercase categories into uppercase ones</span></p>
<div><br>
</div>
<div>Is this actually useful? I used to distinguish between lowercase "aspects" or "functionalities" (such as mouse, keyboard, ...) and uppercase "Tools" or "Components" (such as OCompletion, Sandblocks etc.). What do you think?</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p></p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org><br>
<b>Gesendet:</b> Mittwoch, 23. März 2022 10:22:57<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org; packages@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Trunk: PreferenceBrowser-mt.139.mcz</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Marcel Taeumel uploaded a new version of PreferenceBrowser to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/PreferenceBrowser-mt.139.mcz">http://source.squeak.org/trunk/PreferenceBrowser-mt.139.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: PreferenceBrowser-mt.139<br>
Author: mt<br>
Time: 23 March 2022, 10:22:57.915972 am<br>
UUID: 801aa3e9-251d-4b72-9809-7e44ebf4e9ed<br>
Ancestors: PreferenceBrowser-mt.138<br>
<br>
Some visual clean-up and changes in preference browser:<br>
- Merge lowercase categories into uppercase ones<br>
- Show number of prefs per category<br>
- Correct list margin in prefs list<br>
- Cache category list for smooth interaction<br>
- Use default button color<br>
- Fixes line breaks several balloon texts<br>
<br>
=============== Diff against PreferenceBrowser-mt.138 ===============<br>
<br>
Item was changed:<br>
  ----- Method: PBPreferenceButtonMorph>>initializeLayout (in category 'initialization') -----<br>
  initializeLayout<br>
         self layoutPolicy: TableLayout new;<br>
                 beTransparent;<br>
+                layoutInset: PluggableListMorph listMargins;<br>
-                layoutInset: 0;<br>
                 cellGap: 0;<br>
                 listCentering: #topLeft;<br>
                 cellPositioning: #topLeft;<br>
                 listDirection: #topToBottom;<br>
                 hResizing: #spaceFill;<br>
                 vResizing: #shrinkWrap.         !<br>
<br>
Item was changed:<br>
  Model subclass: #PreferenceBrowser<br>
+        instanceVariableNames: 'selectedCategoryIndex selectedPreference searchPattern searchResults lastExecutedSearch preferences title categoryList categoryLabelList'<br>
-        instanceVariableNames: 'selectedCategoryIndex selectedPreference searchPattern searchResults lastExecutedSearch preferences title'<br>
         classVariableNames: ''<br>
         poolDictionaries: ''<br>
         category: 'PreferenceBrowser'!<br>
<br>
Item was added:<br>
+ ----- Method: PreferenceBrowser>>categoryLabelList (in category 'accessing') -----<br>
+ categoryLabelList<br>
+ <br>
+        ^ categoryLabelList ifNil: [categoryLabelList := self categoryList<br>
+                collect: [:category | '{1} ({2})' format: {<br>
+                        category.<br>
+                        self numPreferencesInCategory: category }]]!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>categoryList (in category 'accessing') -----<br>
  categoryList<br>
+ <br>
+        ^ categoryList ifNil: [categoryList := OrderedCollection new<br>
-        ^OrderedCollection new<br>
                 add:  self allCategoryLabel;<br>
+                addAll: (preferences categoryList collect: [:ea | ea capitalized]) sorted;<br>
-                addAll: preferences categoryList sorted;<br>
                 add: self searchResultsCategoryLabel;<br>
+                yourself].<br>
-                yourself.<br>
         <br>
         !<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>defaultSelected (in category 'preferences search') -----<br>
  defaultSelected<br>
  <br>
         (Project uiManager <br>
+                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<br>
+                title: 'Restore Default Preferences')<br>
-                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<br>
-                title: 'Restore Preferences')<br>
                         ifFalse: [^ self].<br>
  <br>
         Preferences chooseInitialSettings.!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>loadFromDiskSelected (in category 'preferences search') -----<br>
  loadFromDiskSelected <br>
  <br>
         (Project uiManager<br>
+                confirm: 'Do you really want to restore your personal preferences from disk?\\The file ''my.prefs'' will be loaded.' translated withCRs<br>
+                title: 'Restore Preferences from Disk' translated) ifFalse: [^ self].<br>
-                confirm: 'Do you really want to restore your\personal preferences from disk?\\The file ''my.prefs'' will be loaded.' translated withCRs<br>
-                title: 'Restore Preferences from Disk') ifFalse: [^ self].<br>
  <br>
         preferences restorePreferencesFromDisk!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>loadSelected (in category 'preferences search') -----<br>
  loadSelected<br>
  <br>
         (Project uiManager<br>
+                confirm: 'Do you really want to restore your personal preferences?' translated<br>
-                confirm: 'Do you really want to restore\your personal preferences?' translated withCRs<br>
                 title: 'Restore Preferences') ifFalse: [^ self].<br>
                 <br>
         preferences restorePersonalPreferences.!<br>
<br>
Item was added:<br>
+ ----- Method: PreferenceBrowser>>numPreferencesInCategory: (in category 'accessing') -----<br>
+ numPreferencesInCategory: aCategory<br>
+ <br>
+        aCategory = self allCategoryLabel<br>
+                ifTrue: [^ preferences allPreferences size].<br>
+        aCategory = self searchResultsCategoryLabel<br>
+                ifTrue: [^ self searchResults size].<br>
+        ^ (preferences preferencesInCategory: aCategory) size!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>saveSelected (in category 'preferences search') -----<br>
  saveSelected<br>
  <br>
         (Project uiManager<br>
+                confirm: 'Do you really want to overwrite your personal preferences?' translated<br>
-                confirm: 'Do you really want to overwrite\your personal preferences?' translated withCRs<br>
                 title: 'Save Preferences') ifFalse: [^ self].<br>
  <br>
         preferences savePersonalPreferences.!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>saveToDiskSelected (in category 'preferences search') -----<br>
  saveToDiskSelected <br>
  <br>
         (Project uiManager<br>
+                confirm: 'Do you really want to overwrite your personal preferences on disk?\\The file ''my.prefs'' will be updated.' translated withCRs<br>
+                title: 'Save Preferences to Disk' translated) ifFalse: [^ self].<br>
-                confirm: 'Do you really want to overwrite your\personal preferences on disk?\\The file ''my.prefs'' will be updated.' translated withCRs<br>
-                title: 'Save Preferences to Disk') ifFalse: [^ self].<br>
                 <br>
         preferences storePreferencesToDisk!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>searchPreferencesFor: (in category 'preferences search') -----<br>
  searchPreferencesFor: pattern<br>
         | result |<br>
         result := pattern asString asLowercase withBlanksTrimmed.<br>
         result ifEmpty: [^self].<br>
         searchResults := self allPreferences select: [:aPreference |<br>
                 ((aPreference name includesSubstring: result caseSensitive: false)<br>
                         or: [aPreference helpString includesSubstring: result caseSensitive: false])<br>
+                        or: [aPreference codeString includesSubstring: result caseSensitive: false] ].<br>
+        self updateSearchResultsLabel.<br>
-                        or: [aPreference codeString includesSubstring: result caseSensitive: false] ].         
<br>
         self selectSearchResultsCategory.<br>
         self lastExecutedSearch: pattern.<br>
  !<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowser>>selectedCategoryPreferences (in category 'accessing') -----<br>
  selectedCategoryPreferences<br>
         self allCategorySelected<br>
                 ifTrue: [^self allPreferences].<br>
         self searchResultsCategorySelected <br>
                 ifTrue: [^self searchResults].<br>
+        ^ self selectedCategory<br>
+                ifNil: [#()]<br>
+                ifNotNil: [:cat | self preferencesInCategory: cat]<br>
-        ^self preferencesInCategory: self selectedCategory.<br>
         !<br>
<br>
Item was added:<br>
+ ----- Method: PreferenceBrowser>>updateSearchResultsLabel (in category 'user interface') -----<br>
+ updateSearchResultsLabel<br>
+ <br>
+        self categoryLabelList<br>
+                at: self categoryLabelList size<br>
+                put: ('{1} ({2})' format: {<br>
+                        self searchResultsCategoryLabel.<br>
+                        self searchResults size }).<br>
+        self changed: #categoryLabelList.!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>basicButton (in category 'submorphs - buttons') -----<br>
  basicButton<br>
  <br>
         ^ PluggableButtonMorph new<br>
                 model: self model;<br>
-                offColor: self paneColor;<br>
                 hResizing: #spaceFill;<br>
                 vResizing: #spaceFill;<br>
                 yourself!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>helpButton (in category 'submorphs - buttons') -----<br>
  helpButton<br>
         ^helpButton ifNil: <br>
                 [helpButton := self basicButton <br>
                                                 label: 'help' translated; <br>
+                                                setBalloonText: 'Click here to get some hints on use of this Preferences Panel' translated;<br>
-                                                setBalloonText: <br>
-                                                        'Click here to get some hints on use of this Preferences ',<br>
-                                                        'Panel' translated;<br>
                                                 action: #helpSelected]!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>loadButton (in category 'submorphs - buttons') -----<br>
  loadButton<br>
         ^loadButton ifNil: <br>
                 [loadButton := self basicButton <br>
                                                 label: 'load' translated; <br>
                                                 action: #loadSelected;                                         
<br>
+                                                setBalloonText: 'Click here to reset all the preferences to their values in your Personal Preferences.' translated]!<br>
-                                                setBalloonText: <br>
-                                                        'Click here to reset all the preferences to their values ',<br>
-                                                        'in your Personal Preferences.' translated]!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>loadFromDiskButton (in category 'submorphs - buttons') -----<br>
  loadFromDiskButton<br>
         ^loadFromDiskButton ifNil: <br>
                 [loadFromDiskButton := self basicButton <br>
                                                 label: 'load from disk' translated;
<br>
                                                 action: #loadFromDiskSelected;                                         
<br>
+                                                setBalloonText: 'Click here to load all the preferences from their saved values on disk.' translated]!<br>
-                                                setBalloonText: <br>
-                                                        'Click here to load all the preferences from ',<br>
-                                                        'their saved values on disk.' translated]!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>newButtonRow (in category 'submorphs - buttons') -----<br>
  newButtonRow<br>
         ^BorderedMorph new<br>
                 color: Color transparent;<br>
                 borderWidth: 0;<br>
+                cellGap: ToolBuilder default panelSpacing;<br>
-                cellGap: 2;<br>
                 layoutPolicy: TableLayout new;<br>
                 listDirection: #leftToRight;<br>
                 listCentering: #topLeft;<br>
                 cellPositioning: #topLeft;<br>
                 on: #mouseEnter send: #paneTransition: to: self;<br>
                 on: #mouseLeave send: #paneTransition: to: self;<br>
                 addMorphBack: self defaultButton;<br>
                 addMorphBack: self newSeparator;<br>
                 addMorphBack: self saveButton;<br>
                 addMorphBack: self loadButton;<br>
                 addMorphBack: self newSeparator;<br>
                 addMorphBack: self saveToDiskButton;<br>
                 addMorphBack: self loadFromDiskButton;<br>
                 addMorphBack: self newSeparator;<br>
                 addMorphBack: self themeButton;<br>
                 addMorphBack: self newTransparentFiller;<br>
                 addMorphBack: self helpButton;<br>
                 yourself.!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>newCategoryList (in category 'submorphs - category list') -----<br>
  newCategoryList <br>
         ^(PluggableListMorph<br>
                 on: self model<br>
+                list: #categoryLabelList<br>
-                list: #categoryList<br>
                 selected: #selectedCategoryIndex<br>
                 changeSelected: #selectedCategoryIndex:)<br>
                         hResizing: #spaceFill;<br>
                         vResizing: #spaceFill;<br>
                         layoutFrame: (LayoutFrame fractions: (0@0 corner: 0.25@1));<br>
                         yourself.!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>newSeparator (in category 'submorphs - buttons') -----<br>
  newSeparator<br>
+        ^ Morph new<br>
+                color: Color transparent;<br>
+                width: (5 * RealEstateAgent scaleFactor) truncated;<br>
-        ^BorderedMorph new<br>
-                borderWidth: 2;<br>
-                borderColor: Color transparent;<br>
-                color: self paneColor;<br>
-                hResizing: #rigid;<br>
-                width: 5;<br>
                 vResizing: #spaceFill;<br>
                 yourself!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>saveButton (in category 'submorphs - buttons') -----<br>
  saveButton<br>
         ^saveButton ifNil: <br>
                 [saveButton := self basicButton <br>
                                                 label: 'save' translated; <br>
                                                 action: #saveSelected;                                         
<br>
+                                                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]!<br>
-                                                setBalloonText: <br>
-                                                        'Click here to save the current constellation of Preferences ',<br>
-                                                        'settings as your personal defaults; you can get them all ',<br>
-                                                        'reinstalled with a single gesture by clicking the "Restore ',<br>
-                                                        'my Personal Preferences".' translated]!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>saveToDiskButton (in category 'submorphs - buttons') -----<br>
  saveToDiskButton<br>
         ^saveToDiskButton ifNil: <br>
                 [saveToDiskButton := self basicButton <br>
                                                 label: 'save to disk' translated;
<br>
                                                 action: #saveToDiskSelected;                                           
<br>
+                                                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]!<br>
-                                                setBalloonText: <br>
-                                                        'Click here to save the current constellation of Preferences ',<br>
-                                                        'settings to a file; you can get them all reinstalled with a ',
<br>
-                                                        'single gesture by clicking "Restore Settings From Disk".'<br>
-                                                                 translated]!<br>
<br>
Item was changed:<br>
  ----- Method: PreferenceBrowserMorph>>updateSelectedCategoryPreferences (in category 'updating') -----<br>
  updateSelectedCategoryPreferences<br>
+ <br>
+        | newPanel |<br>
+        self preferenceList vScrollBarValue: 0.<br>
+        self preferenceList scroller removeAllMorphs.<br>
+ <br>
+        (self model allCategorySelected or: [self model searchResultsCategorySelected])<br>
+                ifTrue: [Cursor wait showWhile: [newPanel := self newPreferenceListInnerPanel]]<br>
+                ifFalse: [newPanel := self newPreferenceListInnerPanel].<br>
+                <br>
+        self preferenceList scroller addMorphBack: newPanel.<br>
+        self adoptPaneColor: self paneColor.!<br>
-        Cursor wait showWhile: <br>
-                [self preferenceList <br>
-                                hScrollBarValue: 0;<br>
-                                vScrollBarValue: 0.<br>
-                self preferenceList scroller removeAllMorphs.<br>
-                self preferenceList scroller addMorphBack: self newPreferenceListInnerPanel.<br>
-                self adoptPaneColor: self paneColor]!<br>
<br>
<br>
</div>
</span></font>
</body>
</html>