I moved four related packages for this update to trunk, and moved the prior inbox versions to treated.
For reference, the attach change set contains the updates to all four packages. If anyone disagrees with the update, revert the changes in this change set.
Following the update, you can open a new browser and the differences that you will see are:
- If you have the rounded buttons preference enabled, browser buttons will be rounded but the button labeled "source" will be square.
- If you have the rounded buttons preference disabled, browser buttons will be square but the button labeled "source" will be rounded.
- If you click the "source" button and change the selection to e.g. "byteCodes", the button label will change to reflect the new setting.
This is intended to restore behavior similar to Squeak 3.8 that could not be supported in ToolBuilder until now.
Dave
On Wed, Sep 28, 2011 at 11:46:18PM +0000, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.51.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-dtl.51 Author: dtl Time: 28 September 2011, 7:46:21.041 pm UUID: 16fa4b50-f267-4772-bc5e-c1af7472cde0 Ancestors: ToolBuilder-Kernel-cmm.49
Provide updating button for "what to show" button on CodeHolder, similar to Squeak 3.8 behavior. This button activates a menu, and displays the resulting menu selection. For the default look, normal buttons are rounded and the menu activation button is square (vice versa if the "Rounded Button Corners" preference is disabled). When menu selection is changed, the button label displays the selected mode ('source', 'decompile', 'bytecodes' etc).
Changes are in four packages.
ToolBuilder-Kernel:
- Add PluggableButtonSpec>>style to provide style hint. Used to suggest that a button should be rendered differently, in this case rounded versus square corners.
- Add changeLableWhen: to connect pluggable button with change notification, in this case to allow update: #contents to result in a label update in the dependent button.
ToolBuilder-Morphic:
- Add #whenChanged:update: as a mechanism for hooking change events to button updates, allowing an individual button to respond to e.g. self changed: #contents in the model.
- Update MorphicToolBuilder>>buildPluggableButton to make use of style and changeLabelWhen in the widget spec.
Tools:
- Update CodeHolder>>buildCodeProvenanceButtonWith: to add style hint for round/ square corners and changeLableWhen: for change notification to the widget spec.
Note: ToolBuilder has PluggableDropDownListSpec which is presumably intended to describe a drop-down list widget. This is currently unused in the image, but in future might provide a better approach than the current action button with menu approach.
Morphic:
- Let style hint control rounded versus square corners for a PluggableButtonMorph. May be used as a visual cue to distinguish simple action buttons from buttons that invoke a selection menu (e.g. "what to show" button for a CodeHolder).
- Instance var #style was added to PluggableButtonMorph, so must also update #veryDeepInner: to match (problem detected by DeepCopier>>checkClass: called from ChangeSet>>fileOutClassDefinition:on:).
2011/9/29 David T. Lewis lewis@mail.msen.com:
- If you have the rounded buttons preference enabled, browser buttons
will be rounded but the button labeled "source" will be square.
Can't say why, but somehow this works for me best. Great additon. Thanks David.
Alex
squeak-dev@lists.squeakfoundation.org