[squeak-dev] The Trunk: EToys-pre.338.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Nov 1 14:51:49 UTC 2018

Patrick Rein uploaded a new version of EToys to project The Trunk:

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

Name: EToys-pre.338
Author: pre
Time: 1 November 2018, 3:51:24.160943 pm
UUID: 6f79ee91-3e92-be4e-9d20-265de9c14a1f
Ancestors: EToys-dtl.337

Migrates methods to use the menu method selector which sticks to the existing selector pattern

=============== Diff against EToys-dtl.337 ===============

Item was changed:
  ----- Method: PasteUpMorph>>presentViewMenu (in category '*Etoys-viewing') -----
  	"Answer an auxiliary menu with options specific to viewing playfields -- this is put up from the provisional 'view' halo handle, on pasteup morphs only."
  	| aMenu isWorld |
  	isWorld := self isWorldMorph.
  	aMenu := MenuMorph new defaultTarget: self.
  	aMenu addStayUpItem.
  	self addViewingItemsTo: aMenu.
  	#(	"(autoLineLayoutString	toggleAutoLineLayout
  			'whether submorphs should automatically be laid out in lines')"
  		(indicateCursorString	toggleIndicateCursor
  			'whether the "current" submorph should be indicated with a dark black border')
  		(resizeToFitString		toggleResizeToFit
  			'whether I should automatically strive exactly to fit my contents')
  		(behaveLikeAHolderString	toggleBehaveLikeAHolder
  			'whether auto-line-layout, resize-to-fit, and indicate-cursor should be set to true; useful for animation control, etc.')
  		(isPartsBinString		toggleIsPartsBin
  			'whether dragging an object from the interior should produce a COPY of the object')
+ 		(hasDragAndDropEnabledString	changeDragAndDrop
- 		(isOpenForDragNDropString	toggleDragNDrop
  			'whether objects can be dropped into and dragged out of me')
  		(mouseOverHalosString	toggleMouseOverHalos
  			'whether objects should put up halos when the mouse is over them')
  		(autoExpansionString	toggleAutomaticPhraseExpansion
  			'whether tile phrases, dropped on me, should automatically sprout Scriptors around them')
  		(originAtCenterString	toggleOriginAtCenter
  			'whether the cartesian origin of the playfield should be at its lower-left corner or at the center of the playfield')
  		(showThumbnailString	toggleAlwaysShowThumbnail
  			'whether large objects should be represented by thumbnail miniatures of themselves')
  		(fenceEnabledString	toggleFenceEnabled
  			'whether moving objects should stop at the edge of their container')
  		(autoViewingString		toggleAutomaticViewing
  			'governs whether, when an object is touched inside me, a viewer should automatically be launched for it.')
  		(griddingString			griddingOnOff
  			'whether gridding should be used in my interior')
  		(gridVisibleString		gridVisibleOnOff
  			'whether the grid should be shown when gridding is on')
  	) do:
  			[:triplet |
  				(isWorld and: [#(toggleAutoLineLayout toggleIndicateCursor toggleIsPartsBin toggleAlwaysShowThumbnail toggleAutomaticViewing ) includes: triplet second]) ifFalse:
  					[aMenu addUpdating: triplet first action: triplet second.
  					aMenu balloonTextForLastItem: triplet third translated]]. 
  	aMenu addLine.
  	aMenu add: 'round up strays' translated action: #roundUpStrays.
  	aMenu balloonTextForLastItem:  'Bring back all objects whose current coordinates keep them from being visible, so that at least a portion of each of my interior objects can be seen.' translated.
  	aMenu add: 'gallery of players' translated target: self action: #galleryOfPlayers.
  	aMenu balloonTextForLastItem:  'A tool that lets you find out about all the players used in this project' translated.
  	aMenu add: 'shuffle contents' translated action: #shuffleSubmorphs.
  	aMenu balloonTextForLastItem: 'Rearranges my contents in random order' translated.
  	aMenu add: 'set grid spacing...' translated action: #setGridSpec.
  	aMenu balloonTextForLastItem: 'Set the spacing to be used when gridding is on' translated.
  	isWorld ifFalse:
  		[aMenu add: 'set thumbnail height...' translated action: #setThumbnailHeight.
  		aMenu balloonTextForLastItem: 'if currently showing thumbnails governs the standard height for them' translated].
  	self backgroundSketch ifNotNil:
  		[aMenu add: 'delete background painting' translated action: #deleteBackgroundPainting.
  		aMenu balloonTextForLastItem: 'delete the graphic that forms the background for this me.' translated].
  	aMenu addLine.
  	self addPenTrailsMenuItemsTo: aMenu.
  	aMenu addLine.
  	aMenu add: 'use standard texture' translated action: #setStandardTexture.
  	aMenu balloonTextForLastItem: 'use a pale yellow-and-blue background texture here.' translated.
  	aMenu add: 'make graph paper...' translated action: #makeGraphPaper.
  	aMenu balloonTextForLastItem: 'Design your own graph paper and use it as the background texture here.' translated.
  	aMenu addTitle: ('viewing options for "{1}"' translated format: {self externalName}).
  	aMenu popUpForHand: self activeHand in: self world

Item was changed:
  ----- Method: StackMorph>>offerBookishMenu (in category 'menu') -----
  	"Offer a menu with book-related items in it"
  	| aMenu |
  	aMenu := MenuMorph new defaultTarget: self.
  	aMenu addTitle: 'Stack / Book' translated.
  	aMenu addStayUpItem.
  	aMenu addList:
  		#(('sort pages' sortPages)
  		('uncache page sorter' uncachePageSorter)).
  	(self hasProperty: #dontWrapAtEnd)
  		ifTrue: [aMenu add: 'wrap after last page' translated selector: #setWrapPages: argument: true]
  		ifFalse: [aMenu add: 'stop at last page' translated selector: #setWrapPages: argument: false].
  	aMenu addList:
  		#(('make bookmark'	 bookmarkForThisPage)
  		('make thumbnail' thumbnailForThisPage)).
  	aMenu addLine.
  	aMenu add: 'sound effect for all pages' translated action: #menuPageSoundForAll:.
  	aMenu add: 'sound effect this page only' translated action: #menuPageSoundForThisPage:.
  	aMenu add: 'visual effect for all pages' translated action: #menuPageVisualForAll:.
  	aMenu add: 'visual effect this page only' translated action: #menuPageVisualForThisPage:.
  	aMenu addLine.
  	(self primaryHand pasteBuffer class isKindOf: PasteUpMorph class) ifTrue:
  		[aMenu add: 'paste book page'   translated action: #pasteBookPage].
  	aMenu add: 'save as new-page prototype' translated action: #setNewPagePrototype.
  	newPagePrototype ifNotNil: [
  		aMenu add: 'clear new-page prototype' translated action: #clearNewPagePrototype].
  	aMenu add: (self dragNDropEnabled ifTrue: ['close' translated ] ifFalse: ['open' translated]) , ' dragNdrop' translated
+ 			action: #changeDragAndDrop.
- 			action: #toggleDragNDrop.
  	aMenu addLine.
  	aMenu add: 'make all pages this size' translated action: #makeUniformPageSize.
  	aMenu addUpdating: #keepingUniformPageSizeString target: self action: #toggleMaintainUniformPageSize.
  	aMenu addLine.
  	aMenu add: 'send all pages to server' translated action: #savePagesOnURL.
  	aMenu add: 'send this page to server' translated action: #saveOneOnURL.
  	aMenu add: 'reload all from server' translated action: #reload.
  	aMenu add: 'copy page url to clipboard' translated action: #copyUrl.
  	aMenu add: 'keep in one file' translated action: #keepTogether.
  	aMenu addLine.
  	aMenu add: 'load PPT images from slide #1' translated action: #loadImagesIntoBook.
  	aMenu add: 'background color for all pages...' translated action: #setPageColor.
  	aMenu popUpEvent: self world activeHand lastEvent in: self world

More information about the Squeak-dev mailing list