personalized user menu in 3.9

Jay Hardesty jayh at panix.com
Mon Sep 4 01:35:51 UTC 2006


Noticed that in 3.9 (7055) that the personalized user menu
doesn't appear, when doing a yellow button click on the World,
regardless of the preferences setting.

Here's what I did to get it back - don't know if this is the proper  
approach -
took a chunk of code from  
PasteUpMorph>>yellowButtonClickOnDesktopWithEvent:
and added it to:

yellowButtonActivity: shiftState
	"Find me or my outermost owner that has items to add to a
	yellow button menu.
	shiftState is true if the shift was pressed.
	Otherwise, build a menu that contains the contributions from
	myself and my interested submorphs,
	and present it to the user."
	| menu |
	self isWorldMorph
		ifFalse: [| outerOwner |
			outerOwner _ self outermostOwnerWithYellowButtonMenu.
			outerOwner
				ifNil: [^ self].
			outerOwner == self
				ifFalse: [^ outerOwner yellowButtonActivity: shiftState]].
	Preferences personalizedWorldMenu
		ifTrue: [menu _ MenuMorph new defaultTarget: self.
			Preferences personalizeUserMenu: menu.
			menu addLine.
			menu
				add: 'personalize...' translated
				target: Preferences
				action: #letUserPersonalizeMenu]
		ifFalse: [
			menu _ self buildYellowButtonMenu: ActiveHand.
			menu
				addTitle: self externalName
				icon: (self iconOrThumbnailOfSize: (Preferences tinyDisplay  
ifTrue: [16] ifFalse: [28]))].
	menu popUpInWorld: self currentWorld



More information about the Squeak-dev mailing list