The Trunk: ToolBuilder-Morphic-mt.125.mcz

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

The Trunk: ToolBuilder-Morphic-mt.125.mcz

commits-2
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.125.mcz

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

Name: ToolBuilder-Morphic-mt.125
Author: mt
Time: 12 April 2015, 9:13:36.15 pm
UUID: 439aa91f-e743-484c-b3de-ab565e2cfdfe
Ancestors: ToolBuilder-Morphic-mt.124

Pluggable menus recategorized as required widgets.

=============== Diff against ToolBuilder-Morphic-mt.124 ===============

Item was changed:
+ ----- Method: MorphicToolBuilder>>buildPluggableMenu: (in category 'widgets required') -----
- ----- Method: MorphicToolBuilder>>buildPluggableMenu: (in category 'building') -----
  buildPluggableMenu: menuSpec
  | prior menu |
  prior := parentMenu.
  parentMenu := menu := self menuClass new.
  menuSpec label ifNotNil:[parentMenu addTitle: menuSpec label].
  menuSpec items do:[:each| each buildWith: self].
  parentMenu := prior.
  ^menu!

Item was changed:
+ ----- Method: MorphicToolBuilder>>buildPluggableMenuItem: (in category 'widgets required') -----
- ----- Method: MorphicToolBuilder>>buildPluggableMenuItem: (in category 'building') -----
  buildPluggableMenuItem: itemSpec
  | item action label menu |
  item := self menuItemClass new.
  label := (itemSpec isCheckable
  ifTrue: [ itemSpec checked ifTrue: ['<on>'] ifFalse: ['<off>']]
  ifFalse: ['']), itemSpec label.
  item contents: label.
  item isEnabled: itemSpec enabled.
  (action := itemSpec action) ifNotNil:[
  item
  target: action receiver;
  selector: action selector;
  arguments: action arguments.
  ].
  (menu := itemSpec subMenu) ifNotNil:[
  item subMenu: (menu buildWith: self).
  ].
  parentMenu ifNotNil:[parentMenu addMorphBack: item].
  itemSpec separator ifTrue:[parentMenu addLine].
  ^item!