The Inbox: PreferenceBrowser-cbc.103.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: PreferenceBrowser-cbc.103.mcz

commits-2
A new version of PreferenceBrowser was added to project The Inbox:
http://source.squeak.org/inbox/PreferenceBrowser-cbc.103.mcz

==================== 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') -----
  initializePage04InteractionMore
 
+ | 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).
  }.!


cbc
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: PreferenceBrowser-cbc.103.mcz

cbc
I like the PreferenceBrowser verbiage for [Enter], but the formatting in mt.103.  Ideally this could pull from that PreferenceBrowser location, and the PreferenceBrowser help could be updated.  Probably should have included my preference - sorry about that.

-cbc

On Mon, Jun 1, 2020 at 8:48 PM <[hidden email]> wrote:
A new version of PreferenceBrowser was added to project The Inbox:
http://source.squeak.org/inbox/PreferenceBrowser-cbc.103.mcz

==================== 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') -----
  initializePage04InteractionMore

+       | 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).         
                }.!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: PreferenceBrowser-cbc.103.mcz

marcel.taeumel
In reply to this post by commits-2
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.

#stateFilterableLists
#toggleFilterableLists
#helpFilterableLists

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

Best,
Marcel

Am 02.06.2020 05:47:54 schrieb [hidden email] <[hidden email]>:

A new version of PreferenceBrowser was added to project The Inbox:
http://source.squeak.org/inbox/PreferenceBrowser-cbc.103.mcz

==================== 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') -----
initializePage04InteractionMore

+ | 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).
}.!