[squeak-dev] The Inbox: PreferenceBrowser-cbc.103.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Wed Jun 3 13:46:32 UTC 2020

Hmm... it re-uses the help string but duplicates the "Filterable Lists" name. Not sure what is better. 

If I recall correctly, I decoupled the names to have more freedom when designing the wizard's pages. And to integrate pragma preferences and normal ones. But it felt wrong to copy over all help texts.

I suppose that it would be more consistent to also add #help* methods for each preference used in the wizard. Just like there are #state* and #toggle* methods. In such methods, one could easily hide your lookup suggestion.


Hmm... it is not that easy to query the pragma preference object from having PluggableListMorph class >> #filterableLists ... so close! :-)

Am 02.06.2020 05:47:54 schrieb commits at source.squeak.org <commits at source.squeak.org>:
A new version of PreferenceBrowser was added to project The Inbox:

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

Name: PreferenceBrowser-cbc.103
Author: cbc
Time: 1 June 2020, 8:47:46.016726 pm
UUID: a2e0791b-c23c-9044-9d60-4ac9c13e4db0
Ancestors: PreferenceBrowser-mt.102

Fixes similar issue to mt.103, except uses the test found in PreferenceBrowser instead of creating a new text. This method may be superior, since the preference help will be localized in one location.

=============== Diff against PreferenceBrowser-mt.102 ===============

Item was changed:
----- Method: PreferenceWizardMorph>>initializePage04InteractionMore (in category 'initialization - pages') -----

+ | currentPage pane filterableHelp |
- | currentPage pane |
currentPage := pages add: self createPage.
pane := self createScrollPane.

currentPage addMorphBack: (self createLabel: 'Choose more interaction settings' color: Color white).
currentPage addMorphBack: pane.

+ "Next line added because using 'normal' lookup does not find the right text."
+ filterableHelp := Preferences allPreferences
+ detect:[:pref | pref name = 'Filterable Lists']
+ ifFound: [:pref | (pref helpString lines joinSeparatedBy: ' ') withBlanksTrimmed]
+ ifNone: [''].
pane scroller firstSubmorph addAllMorphsBack: {
self createCheckbox: 'Windows raise on click' translated for: #WindowsRaiseOnClick help: #(window raise).
self createCheckbox: 'Windows always active' for: #WindowsAlwaysActive help: #(window content active).
self createCheckbox: 'Window buttons always active' translated for: #WindowButtonsAlwaysActive help: #(window control active).
self createVerticalSpace.
self createCheckbox: 'Smart horizontal splitters' translated for: #SmartHorizontalSplitters help: #(horizontal splitter).
self createCheckbox: 'Smart vertical splitters' translated for: #SmartVerticalSplitters help: #(vertical splitter).
self createVerticalSpace.
+ self createCheckbox: 'Filterable lists and trees' translated for: #FilterableLists help: filterableHelp.
- self createCheckbox: 'Filterable lists and trees' translated for: #FilterableLists help: #(filterable).
self createCheckbox: 'Filters clear if unfocused' translated for: #ClearFilterAutomatically help: #(filter clear).
self createVerticalSpace.
self createCheckbox: 'Attach tools to mouse' translated for: #AttachToolsToMouse help: #(tools attach).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200603/b4629e3c/attachment.html>

More information about the Squeak-dev mailing list