[squeak-dev] The Inbox: PreferenceBrowser-ct.150.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 20 16:48:45 UTC 2022

A new version of PreferenceBrowser was added to project The Inbox:

==================== Summary ====================

Name: PreferenceBrowser-ct.150
Author: ct
Time: 20 May 2022, 6:48:44.518499 pm
UUID: 3d8cf55a-3022-9643-8df9-fd41f5577848
Ancestors: PreferenceBrowser-mt.149

Proposal: Also search the category list of preferences via the search field. I was so confused that some 'halo' preferences did not appear in the search results.

=============== Diff against PreferenceBrowser-mt.149 ===============

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]
+ 			or: [aPreference categoryList anySatisfy: [:category |
+ 				category includesSubstring: result caseSensitive: false]] ].
- 			or: [aPreference codeString includesSubstring: result caseSensitive: false] ].
  	self updateSearchResultsLabel.
  	self selectSearchResultsCategory.
  	self lastExecutedSearch: pattern.

More information about the Squeak-dev mailing list