[squeak-dev] The Trunk: Morphic-ar.171.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 7 19:21:18 UTC 2009


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

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

Name: Morphic-ar.171
Author: ar
Time: 7 September 2009, 12:18:17 pm
UUID: 5a228899-1e98-6543-8a29-f85ea3581786
Ancestors: Morphic-jmv.170

Remove a usage of SelectionMenu in TextEditor and clean out some obscure code paths that were never actually used. Leave in the actual menu definitions for now since although they aren't used it's yet unclear what the ultimate location for these will be.

=============== Diff against Morphic-jmv.170 ===============

Item was changed:
  ----- Method: TextMorph>>addCustomMenuItems:hand: (in category 'menu') -----
  addCustomMenuItems: aCustomMenu hand: aHandMorph
  	| outer |
  	super addCustomMenuItems: aCustomMenu hand: aHandMorph.
  	aCustomMenu add: 'text properties...' translated action: #changeTextColor.
  	aCustomMenu addUpdating: #autoFitString target: self action: #autoFitOnOff.
  	aCustomMenu addUpdating: #wrapString target: self action: #wrapOnOff.
  	aCustomMenu add: 'text margins...' translated action: #changeMargins:.
  	aCustomMenu add: 'add predecessor' translated action: #addPredecessor:.
  	aCustomMenu add: 'add successor' translated action: #addSuccessor:.
+ 	
- 	(Preferences noviceMode
- 			or: [Preferences simpleMenus])
- 		ifFalse: [aCustomMenu add: 'code pane menu...' translated action: #yellowButtonActivity.
- 			aCustomMenu add: 'code pane shift menu...' translated action: #shiftedYellowButtonActivity].
- 
  	outer := self owner.
  	outer ifNotNil: [
  	outer isLineMorph ifTrue:
  		[container isNil
  			ifTrue: [aCustomMenu add: 'follow owner''s curve' translated action: #followCurve]
  			ifFalse: [aCustomMenu add: 'reverse direction' translated action: #reverseCurveDirection.
  					aCustomMenu add: 'set baseline' translated action: #setCurveBaseline:]]
  		ifFalse:
  		[self fillsOwner
  			ifFalse: [aCustomMenu add: 'fill owner''s shape' translated action: #fillingOnOff]
  			ifTrue: [aCustomMenu add: 'rectangular bounds' translated action: #fillingOnOff].
  		self avoidsOcclusions
  			ifFalse: [aCustomMenu add: 'avoid occlusions' translated action: #occlusionsOnOff]
  			ifTrue: [aCustomMenu add: 'ignore occlusions' translated action: #occlusionsOnOff]]].
  	aCustomMenu addLine.
  	aCustomMenu add: 'holder for characters' translated action: #holderForCharacters
  !

Item was changed:
  ----- Method: SmalltalkEditor class>>initializeYellowButtonMenu (in category 'keyboard shortcut tables') -----
  initializeYellowButtonMenu
  	"Initialize the yellow button pop-up menu and corresponding messages."
  
  	"SmalltalkEditor initialize"
  
+ 	yellowButtonMenu := {
- 	yellowButtonMenu _ SelectionMenu fromArray: {
  		{'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}.
  		#-.	     
  		{'accept (s)' translated.			#accept}.
  		{'cancel (l)' translated.				#cancel}.
  		#-.	     
  		{'show bytecodes' translated.		#showBytecodes}.
  		#-.	     
  		{'more...' translated.				#shiftedTextPaneMenuRequest}.
  	}!

Item was changed:
  ----- Method: TextEditor class>>initializeYellowButtonMenu (in category 'keyboard shortcut tables') -----
  initializeYellowButtonMenu
  	"Initialize the yellow button pop-up menu and corresponding messages."
  
  	"TextEditor initialize"
  
+ 	yellowButtonMenu := {
- 	yellowButtonMenu _ SelectionMenu fromArray: {
  		{'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}.
  		#-.
  		{'set font... (k)' translated.			#offerFontMenu}.
  		{'set style... (K)' translated.		#changeStyle}.
  		{'set alignment...' translated.		#chooseAlignment}.
  		"
  		#-.
  		{'more...' translated.				#shiftedTextPaneMenuRequest}.
  		"
  	}!

Item was changed:
  ----- Method: SmalltalkEditor class>>initializeShiftedYellowButtonMenu (in category 'keyboard shortcut tables') -----
  initializeShiftedYellowButtonMenu
  	"Initialize the yellow button pop-up menu and corresponding messages."
  
  	"SmalltalkEditor initialize"
  
+ 	shiftedYellowButtonMenu := {
- 	shiftedYellowButtonMenu _ SelectionMenu fromArray: {
  		{'set font... (k)' translated.					#offerFontMenu}.
  		{'set style... (K)' translated.				#changeStyle}.
  		{'set alignment...' translated.				#chooseAlignment}.
  		#-.
  		{'explain' translated.						#explain}.
  		{'pretty print' translated.					#prettyPrint}.
  		{'pretty print with color' translated.		#prettyPrintWithColor}.
  		{'file it in (G)' translated.					#fileItIn}.
  		{'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}.
  		#-.
  		{'more...' translated.						#yellowButtonActivity}.
  	}!

Item was changed:
  ----- Method: TextEditor class>>initializeShiftedYellowButtonMenu (in category 'keyboard shortcut tables') -----
  initializeShiftedYellowButtonMenu
  	"Initialize the yellow button pop-up menu and corresponding messages."
  
  	"TextEditor initialize"
  	"
+ 	shiftedYellowButtonMenu := {
- 	shiftedYellowButtonMenu _ SelectionMenu fromArray: {
  		{'set font... (k)' translated.					#offerFontMenu}.
  		{'set style... (K)' translated.				#changeStyle}.
  		{'set alignment...' translated.				#chooseAlignment}.
  		#-.
  		{'more...' translated.						#yellowButtonActivity}.
  	}
  	"
  	shiftedYellowButtonMenu _ yellowButtonMenu!

Item was removed:
- ----- Method: TextEditor>>shiftedTextPaneMenuRequest (in category 'pluggable menus') -----
- shiftedTextPaneMenuRequest
- 	"The user chose the more... branch from the text-pane menu."
- 
- 	^ self pluggableYellowButtonActivity: true!

Item was removed:
- ----- Method: TextMorph>>yellowButtonActivity (in category 'event handling') -----
- yellowButtonActivity
- 	"Supply the normal 'code pane' menu to use its text editing 
- 	commands from a menu."
- 	self yellowButtonActivity:false!

Item was removed:
- ----- Method: TextEditor>>getPluggableYellowButtonMenu: (in category 'private') -----
- getPluggableYellowButtonMenu: shiftKeyState
- 	| customMenu |
- 	^ (morph notNil and: [(customMenu _ morph getMenu: shiftKeyState) notNil])
- 		ifTrue: [customMenu]
- 		ifFalse:
- 			[shiftKeyState
- 				ifTrue: [self class shiftedYellowButtonMenu]
- 				ifFalse: [self class yellowButtonMenu]]!

Item was removed:
- ----- Method: TextEditor>>pluggableYellowButtonActivity: (in category 'pluggable menus') -----
- pluggableYellowButtonActivity: shiftKeyState
- 	"Invoke the model's popup menu."
- 
- 	| menu |
- 	(menu _ self getPluggableYellowButtonMenu: shiftKeyState)
- 		ifNil:
- 			[sensor waitNoButton]
- 		ifNotNil:
- 			[menu invokeOn: model orSendTo: self]!

Item was removed:
- ----- Method: TextMorph>>shiftedYellowButtonActivity (in category 'menu') -----
- shiftedYellowButtonActivity
- 	"Supply the normal 'code pane' menu to use its text editing commands from a menu."
- 
- 	self editor pluggableYellowButtonActivity: true.
- 	self changed.
- !

Item was removed:
- ----- Method: TextEditor>>yellowButtonActivity (in category 'menu messages') -----
- yellowButtonActivity
- 	"This normally opens a popup menu. Determine the selected
- 	item and, if one is selected, then send the corresponding message
- 	to either the model or the receiver."
- 
- 	^ self pluggableYellowButtonActivity: sensor leftShiftDown!




More information about the Squeak-dev mailing list