[squeak-dev] The Trunk: Graphics-ar.75.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 7 22:04:27 UTC 2009


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

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

Name: Graphics-ar.75
Author: ar
Time: 7 September 2009, 3:03:36 am
UUID: 280b651a-9e95-b34c-986b-4c9c0f4c63b7
Ancestors: Graphics-jmv.74

Remove some no longer necessary methods in TextStyle which introduced dependencies on Morphic and MVC.

=============== Diff against Graphics-jmv.74 ===============

Item was removed:
- ----- Method: TextStyle class>>modalStyleSelectorWithTitle: (in category 'user interface') -----
- modalStyleSelectorWithTitle: title
- 	"Presents a modal font-style choice menu, answers a TextStyle or nil."
- 	"TextStyle modalStyleSelectorWithTitle: 'testing'"
- 	
- 	| menu actualStyles |
- 	Smalltalk isMorphic ifFalse: [ ^self modalMVCStyleSelectorWithTitle: title ].
- 
- 	menu := MenuMorph entitled: title.
- 	actualStyles := self actualTextStyles.
- 	actualStyles keysSortedSafely do: [ :styleName | | style |
- 		style := actualStyles at: styleName.
- 		menu add: styleName target: menu selector: #modalSelection: argument: style.
- 		menu lastItem font: (style fontOfSize: 18)
- 	].
- 	^menu invokeModal.
- !

Item was removed:
- ----- Method: TextStyle class>>mvcPromptForFont:andSendTo:withSelector: (in category 'user interface') -----
- mvcPromptForFont: aPrompt andSendTo: aTarget withSelector: aSelector
- 	"MVC Only!! prompt for a font and if one is provided, send it to aTarget using a message with selector aSelector."
- 	| aMenu aChoice aStyle namesAndSizes aFont |
- 	"TextStyle mvcPromptForFont: 'Choose system font style' andSendTo: TextStyle withSelector: #setSystemFontTo:"
- 	aMenu := CustomMenu new.
- 	self actualTextStyles keysSortedSafely do:
- 		[:styleName |
- 			aMenu add: styleName action: styleName].
- 	aChoice := aMenu startUpWithCaption: aPrompt.
- 	aChoice ifNil: [^ self].
- 	aMenu := CustomMenu new.
- 	aStyle := self named: aChoice.
- 	(namesAndSizes := aStyle fontNamesWithPointSizes) do:
- 		[:aString | aMenu add: aString action: aString].
- 	aChoice := aMenu startUpWithCaption: nil.
- 	aChoice ifNil: [^ self].
- 	aFont := aStyle fontAt: (namesAndSizes indexOf: aChoice).
- 	aTarget perform: aSelector with: aFont!

Item was removed:
- ----- Method: TextStyle class>>modalMVCStyleSelectorWithTitle: (in category 'user interface') -----
- modalMVCStyleSelectorWithTitle: title
- 	"MVC Only!! Presents a modal font-style choice menu, answers a TextStyle or nil."
- 	"TextStyle modalMVCStyleSelectorWithTitle: 'testing'"
- 	
- 	| aMenu actualStyles |
- 	aMenu := CustomMenu new.
- 	actualStyles := self actualTextStyles.
- 	actualStyles keysSortedSafely do: [ :styleName | | style |
- 		style := actualStyles at: styleName.
- 		aMenu add: styleName action: style
- 	].
- 	^aMenu startUpWithCaption: title.
- !




More information about the Squeak-dev mailing list