[squeak-dev] The Trunk: ST80-ar.55.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 6 06:30:18 UTC 2009


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

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

Name: ST80-ar.55
Author: ar
Time: 5 October 2009, 11:29:50 am
UUID: 4e518ab9-2d91-784c-b7c0-ffd33ade523c
Ancestors: ST80-dtl.54

A bit of yellowButtonMenu refactoring. Moves the definition of the [shifted]yellowButtonMenu into StringHolder since it used from three places (MVC, Morphic, Tools) and StringHolder will ultimately go into Kernel-Models. This is still a bit awkward (there ought to be better ways to organize these menus) but for the time being it serves the purpose of avoiding dependencies to ParagraphEditor all over the places.

=============== Diff against ST80-dtl.54 ===============

Item was changed:
  ----- Method: StringHolder>>codePaneMenu:shifted: (in category 'code pane menu') -----
+ codePaneMenu: aMenu shifted: shifted
+ 	"Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane"
+ 	^self class codePaneMenu: aMenu shifted: shifted!
- codePaneMenu: aMenu shifted: shifted 
- 	"Note that unless we override perform:orSendTo:, 
- 	PluggableTextController will respond to all menu items in a 
- 	text pane"
- 	| donorMenu |
- 	donorMenu := shifted
- 				ifTrue: [ParagraphEditor shiftedYellowButtonMenu]
- 				ifFalse: [ParagraphEditor yellowButtonMenu].
- 	^ aMenu addAllFrom: donorMenu!

Item was added:
+ ----- Method: StringHolder class>>codePaneMenu:shifted: (in category 'yellow button menu') -----
+ codePaneMenu: aMenu shifted: shifted
+ 	"Utility method for the 'standard' codePane menu"
+ 	aMenu addList: (shifted 
+ 		ifTrue:[self shiftedYellowButtonMenuItems]
+ 		ifFalse:[self yellowButtonMenuItems])!

Item was added:
+ ----- Method: StringHolder class>>shiftedYellowButtonMenuItems (in category 'yellow button menu') -----
+ shiftedYellowButtonMenuItems
+ 	"Returns the standard yellow button menu items"
+ 	^{
+ 		{'explain' translated.						#explain}.
+ 		{'pretty print' translated.					#prettyPrint}.
+ 		{'pretty print with color' translated.		#prettyPrintWithColor}.
+ 		{'file it in (G)' translated.					#fileItIn}.
+ 		{'tiles from it' translated.					#selectionAsTiles}.
+ 		{'spawn (o)' translated.						#spawn}.
+ 		#-.
+ 		{'browse it (b)' translated.					#browseIt}.
+ 		{'senders of it (n)' translated.				#sendersOfIt}.
+ 		{'implementors of it (m)' translated.		#implementorsOfIt}.
+ 		{'references to it (N)' translated.			#referencesToIt}.
+ 		#-.
+ 		{'selectors containing it (W)' translated.	#methodNamesContainingIt}.
+ 		{'method strings with it (E)' translated.	#methodStringsContainingit}.
+ 		{'method source with it' translated.		#methodSourceContainingIt}.
+ 		{'class names containing it' translated.	#classNamesContainingIt}.
+ 		{'class comments with it' translated.		#classCommentsContainingIt}.
+ 		{'change sets with it' translated.			#browseChangeSetsWithSelector}.
+ 		#-.
+ 		{'save contents to file...' translated.		#saveContentsInFile}.
+ 		{'send contents to printer' translated.	#sendContentsToPrinter}.
+ 		{'printer setup' translated.					#printerSetup}.
+ 		#-.
+ 		{'special menu...' translated.				#presentSpecialMenu}.
+ 		{'more...' translated.						#yellowButtonActivity}.
+ 	}!

Item was added:
+ ----- Method: StringHolder class>>yellowButtonMenuItems (in category 'yellow button menu') -----
+ yellowButtonMenuItems
+ 	"Returns the standard yellow button menu items"
+ 	^{
+ 			{'set font... (k)' translated.				#offerFontMenu}.
+ 			{'set style... (K)' translated.				#changeStyle}.
+ 			{'set alignment... (u)' translated.		#chooseAlignment}.
+ 			#-.
+ 			{'make project link (P)' translated.	#makeProjectLink}.
+ 			#-.
+ 			{'find...(f)' translated.					#find}.
+ 			{'find again (g)' translated.				#findAgain}.
+ 			{'set search string (h)' translated.		#setSearchString}.
+ 			#-.
+ 			{'do again (j)' translated.				#again}.
+ 			{'undo (z)' translated.					#undo}.
+ 			#-.
+ 			{'copy (c)' translated.					#copySelection}.
+ 			{'cut (x)' translated.						#cut}.
+ 			{'paste (v)' translated.					#paste}.
+ 			{'paste...' translated.					#pasteRecent}.
+ 			#-.
+ 			{'do it (d)' translated.		#doIt}.			     
+ 		{'print it (p)' translated.		#printIt}.		     
+ 		{'inspect it (i)' translated.		#inspectIt}.		     
+ 		{'explore it (I)' translated.		#exploreIt}.		     
+ 		{'debug it' translated.			#debugIt}.		     
+ 		{'tally it' translated.			#tallyIt}.
+ 			#-.
+ 			{'accept (s)' translated.					#accept}.
+ 			{'cancel (l)' translated.					#cancel}.
+ 			#-.
+ 			{'show bytecodes' translated.			#showBytecodes}.
+ 			#-.
+ 			{'copy html' translated.					#copyHtml}.
+ 			#-.
+ 			{'more...' translated.					#shiftedTextPaneMenuRequest}.
+ 		}!




More information about the Squeak-dev mailing list