[squeak-dev] The Inbox: Tools-dtl.380.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Sep 24 19:53:20 UTC 2011


A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-dtl.380.mcz

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

Name: Tools-dtl.380
Author: dtl
Time: 24 September 2011, 3:52:53.953 pm
UUID: 5d683ba9-a1d2-4bf2-afb1-0a3de6950a96
Ancestors: Tools-eem.379

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 three 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.

=============== Diff against Tools-eem.379 ===============

Item was changed:
  ----- Method: CodeHolder>>buildCodeProvenanceButtonWith: (in category 'toolbuilder') -----
  buildCodeProvenanceButtonWith: builder
  	| buttonSpec |
  	buttonSpec := builder pluggableActionButtonSpec new.
  	buttonSpec model: self.
  	buttonSpec label: #codePaneProvenanceString.
+ 	buttonSpec changeLabelWhen: #contents.
+ 	buttonSpec style: #menuButton.
  	buttonSpec action: #offerWhatToShowMenu.
  	buttonSpec help: 'Governs what view is shown in the code pane.  Click here to change the view'.
  	^buttonSpec!




More information about the Squeak-dev mailing list