The Trunk: Protocols-cmm.22.mcz

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

The Trunk: Protocols-cmm.22.mcz

commits-2
Chris Muller uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-cmm.22.mcz

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

Name: Protocols-cmm.22
Author: cmm
Time: 7 February 2010, 5:04:58.614 pm
UUID: 509fe7fa-ba52-4258-afae-cb7c9f089a2f
Ancestors: Protocols-nice.21

Fix problem with trying to use the Protocol browser when Preferences #optionalButtons is not enabled.  The custom-buttons of a Protocol browser are not optional, because the functions they provide cannot be accessed via the menu's or hot-keys.

=============== Diff against Protocols-nice.21 ===============

Item was changed:
  ----- Method: Lexicon>>buildCodePaneWith: (in category 'toolbuilder') -----
  buildCodePaneWith: builder
+ | spec codePane customPanelSpec |
-
- | spec standardButtonPanel codePane customPanelSpec |
  spec := super buildCodePaneWith: builder.
+ spec children
- standardButtonPanel := spec children
  detect: [:ea | ea isKindOf:  PluggablePanelSpec]
+ ifNone: [ nil ]. "do nothing if optionalButtons not enabled"
- ifNone: [^ spec]. "do nothing if optionalButtons not enabled"
  customPanelSpec := self buildCustomButtonsWith: builder.
+ customPanelSpec frame:
+ (self wantsOptionalButtons
+ ifTrue: [ (0@0.12 corner: 1@0.23) ]
+ ifFalse: [ (0@0.0 corner: 1@0.23) ]).
+ spec children add: customPanelSpec.
- customPanelSpec frame: (0@0.12 corner: 1@0.24).
- spec children add: customPanelSpec after: standardButtonPanel.
  "resize code pane so that new panel fits in"
  codePane := spec children detect: [:ea | ea isKindOf:  PluggableCodePaneSpec].
  codePane frame:  (codePane frame withTop: 0.24).
  ^ spec.!