[squeak-dev] The Trunk: ToolBuilder-Kernel-ar.21.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 7 22:17:38 UTC 2009


Andreas Raab uploaded a new version of ToolBuilder-Kernel to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Kernel-ar.21.mcz

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

Name: ToolBuilder-Kernel-ar.21
Author: ar
Time: 7 September 2009, 3:17:26 am
UUID: ad91b06f-0ea1-4343-9546-da8a29b4ee9b
Ancestors: ToolBuilder-Kernel-ar.20

Analyze menu labels to strip of the Morphic <on>/<off>/<yes>/<no> markers.

=============== Diff against ToolBuilder-Kernel-ar.20 ===============

Item was added:
+ ----- Method: PluggableMenuSpec>>analyzeItemLabels (in category 'construction') -----
+ analyzeItemLabels
+ 	"Analyze the item labels"
+ 	items do:[:item| item analyzeLabel].
+ !

Item was changed:
  ----- Method: PluggableMenuSpec>>buildWith: (in category 'construction') -----
  buildWith: builder
+ 	self analyzeItemLabels.
  	^ builder buildPluggableMenu: self!

Item was added:
+ ----- Method: PluggableMenuItemSpec>>analyzeLabel (in category 'initialize') -----
+ analyzeLabel
+ 	"For Morphic compatiblity. Some labels include markup such as <on>, <off> etc.
+ 	Analyze the label for these annotations and take appropriate action."
+ 	| marker |
+ 	marker := label copyFrom: 1 to: (label indexOf: $>).
+ 	(marker = '<on>' or:[marker = '<yes>']) ifTrue:[
+ 		checked := true.
+ 		label := label copyFrom: marker size+1 to: label size.
+ 	].
+ 	(marker = '<off>' or:[marker = '<no>']) ifTrue:[
+ 		checked := false.
+ 		label := label copyFrom: marker size+1 to: label size.
+ 	].
+ !




More information about the Squeak-dev mailing list