[squeak-dev] The Trunk: Morphic-cmm.1011.mcz

Javier Diaz-Reinoso javier_diaz_r at mac.com
Sat Oct 17 15:25:08 UTC 2015


I also don’t like this changes, not only the Cmd-W but the proliferetation of shortcuts, what is this, emacs?

> On Oct 16, 2015, at 11:34, commits at source.squeak.org wrote:
> 
> Chris Muller uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-cmm.1011.mcz
> 
> ==================== Summary ====================
> 
> Name: Morphic-cmm.1011
> Author: cmm
> Time: 16 October 2015, 11:33:30.083 am
> UUID: cd841f83-985d-4bf9-b4bf-80bac0dd2b50
> Ancestors: Morphic-mt.1010
> 
> - Improved keyboard support.  "Desktop" command keys which are not overloaded by browsers are now available globally, so they can be accessed at any time (without needing to first give focus to the desktop).
> 	The following commands are now available globally:
> 		Command+Shift+O -> access a Monticello browser.
> 		Command+Shift+P -> access a Preferences browser.
> 		Command+Shift+Z -> browse the recent change log.
> 		Command+] -> save the image.
> 		Command+\ -> send the active window to the back.
> 		Command+Escape -> Close the active window (formerly Command+w).
> 		Control+Escape -> (new!) access the window list.
> - Encountered a gaggle of debuggers when dragging a Splitter with the mouse.  It happened more than once, not sure why.  Fixed with a guard.
> - HelpBrowsers now honor the Reuse Windows preference.
> 
> =============== Diff against Morphic-mt.1010 ===============
> 
> Item was changed:
>  ----- Method: HandMorph>>sendListenEvent:to: (in category 'private events') -----
>  sendListenEvent: anEvent to: listenerGroup
>  	"Send the event to the given group of listeners"
>  	listenerGroup ifNil:[^self].
>  	listenerGroup do:[:listener| 
> + 		listener ifNotNil:[listener handleListenEvent: anEvent]].!
> - 		listener ifNotNil:[listener handleListenEvent: anEvent copy]].!
> 
> Item was added:
> + ----- Method: HelpBrowser>>representsSameBrowseeAs: (in category '*morphic') -----
> + representsSameBrowseeAs: anotherModel
> + 	^ self hasUnacceptedEdits not and:
> + 		[ (toplevelTopics collect:
> + 			[ : e | e title ]) =
> + 			(anotherModel toplevelTopics collect:
> + 				[ : e | e title ]) ]!
> 
> Item was changed:
>  ----- Method: PasteUpMorph>>becomeActiveDuring: (in category 'initialization') -----
>  becomeActiveDuring: aBlock
>  	"Make the receiver the ActiveWorld during the evaluation of aBlock.
>  	Note that this method does deliberately *not* use #ensure: to prevent
>  	re-installation of the world on project switches."
>  	| priorWorld priorHand priorEvent |
>  	priorWorld := ActiveWorld.
>  	priorHand := ActiveHand.
>  	priorEvent := ActiveEvent.
> + 	priorHand removeEventListener: priorWorld.
>  	ActiveWorld := self.
>  	ActiveHand := self hands first. "default"
>  	ActiveEvent := nil. "not in event cycle"
> + 	ActiveHand addEventListener: self.
>  	aBlock
>  		on: Error
>  		do: [:ex | 
>  			ActiveWorld := priorWorld.
>  			ActiveEvent := priorEvent.
>  			ActiveHand := priorHand.
>  			ex pass]!
> 
> Item was added:
> + ----- Method: PasteUpMorph>>handleListenEvent: (in category 'events-processing') -----
> + handleListenEvent: aUserInputEvent 
> + 	"Handlers for *global* keys, regardless of which widget has keyboard focus."
> + 	aUserInputEvent type = #keystroke ifTrue:
> + 		[ aUserInputEvent commandKeyPressed ifTrue:
> + 			[ aUserInputEvent keyValue = $O asciiValue ifTrue: [ World findAMonticelloBrowser ].
> + 			aUserInputEvent keyValue = $P asciiValue ifTrue: [ World findAPreferencesPanel: aUserInputEvent ].
> + 			aUserInputEvent keyValue = $Z asciiValue ifTrue: [ ChangeList browseRecentLog ].
> + 			aUserInputEvent keyValue = $] asciiValue ifTrue:
> + 				[ Smalltalk
> + 					snapshot: true
> + 					andQuit: false ] ] ]!
> 
> Item was changed:
>  ----- Method: ProportionalSplitterMorph>>updateFromEvent: (in category 'events') -----
>  updateFromEvent: anEvent 
>  	| delta |
> + 	lastMouse ifNil: [ lastMouse := anEvent position ].
>  	delta := splitsTopAndBottom
>  		ifTrue: [ 0 @ ((self normalizedY: anEvent cursorPoint y) - lastMouse y) ]
>  		ifFalse: [ (self normalizedX: anEvent cursorPoint x) - lastMouse x @ 0 ].
>  	lastMouse := splitsTopAndBottom
>  		ifTrue: [ lastMouse x @ (self normalizedY: anEvent cursorPoint y) ]
>  		ifFalse: [ (self normalizedX: anEvent cursorPoint x) @ lastMouse y ].
>  	self repositionBy: delta!
> 
> Item was changed:
>  ----- Method: SystemWindow>>activate (in category 'top window') -----
>  activate
> + 	"Bring the receiver to the top.  If I am modal, bring along my owning window as well."
> + 	| modalOwner |
> + 	self modalChild ifNotNil:
> + 		[ : modalChild | modalChild owner ifNotNil:
> + 			[ modalChild activate.
> + 			^ modalChild modalChild ifNil: [ modalChild flash ] ] ].
> + 	(isCollapsed not and:
> + 		[ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ].
> - 	"Activate the owner too."
> - 
> - 	|mo mc|
> - 	mo := self modalOwner.
> - 	mc := self modalChild.
> - 	mc isNil
> - 		ifFalse: [mc owner notNil ifTrue: [
> - 				mc activate.
> - 				^mc modalChild isNil ifTrue: [mc flash]]].
> - 	(isCollapsed not and: [ 
> - 		self paneMorphs size > 1 and: [ 
> - 			self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ].
>  	self activateWindow.
> + 	ActiveHand addKeyboardListener: self.
> + 	modalOwner := self modalOwner.
> + 	(modalOwner notNil and: [ modalOwner isSystemWindow ]) ifTrue: [ modalOwner bringBehind: self ]!
> - 	self rememberedKeyboardFocus
> - 		ifNil: [(self respondsTo: #navigateFocusForward)
> - 				ifTrue: [self navigateFocusForward]]
> - 		ifNotNil: [:m | m world
> - 						ifNil: [self rememberKeyboardFocus: nil] "deleted"
> - 						ifNotNil: [:w | 
> - 							m wantsKeyboardFocus
> - 								ifTrue: [m takeKeyboardFocus]
> - 								ifFalse: [(self respondsTo: #navigateFocusForward)
> - 											ifTrue: [self navigateFocusForward]]]].
> - 	(mo notNil and: [mo isSystemWindow])
> - 		ifTrue: [mo bringBehind: self]!
> 
> Item was changed:
>  ----- Method: SystemWindow>>handleListenEvent: (in category 'events') -----
> + handleListenEvent: aUserInputEvent 
> + 	aUserInputEvent type = #keystroke ifTrue:
> + 		[ aUserInputEvent commandKeyPressed ifTrue:
> + 			[ aUserInputEvent keyValue = $\ asciiValue ifTrue: [ self class sendTopWindowToBack ].
> + 			"Command+Escape"
> + 			aUserInputEvent keyValue = 27 ifTrue:
> + 				[ aUserInputEvent wasHandled: true.
> + 				ActiveHand removeKeyboardListener: self.
> + 				self delete ] ].
> + 		aUserInputEvent controlKeyPressed ifTrue:
> + 			[ aUserInputEvent keyValue = 27 ifTrue: [ World findWindow: aUserInputEvent ] ] ].
> + 	aUserInputEvent isMouse ifFalse: [ ^ self ].
> + 	"Still dragging?"
> + 	aUserInputEvent hand hasSubmorphs ifTrue: [ ^ self ].
> + 	"Make sure we lock our contents after drag-and-drop has finished."
> + 	(self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [ self configureFocus ].
> + 	aUserInputEvent hand removeMouseListener: self!
> - handleListenEvent: evt
> - 	"Make sure we lock our contents after DnD has finished"
> - 	evt isMouse ifFalse:[^self].
> - 	evt hand hasSubmorphs ifTrue:[^self]. "still dragging"
> - 	(self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [self configureFocus].
> - 	evt hand removeMouseListener: self.!
> 
> Item was changed:
>  ----- Method: SystemWindow>>passivate (in category 'top window') -----
>  passivate
>  	"Lose my drop shadlow and reconfigure my focus according to preferences."
>  	self
>  		 hasDropShadow: false ;
>  		 configureFocus ;
>  		 lookUnfocused.
> + 	ActiveHand removeKeyboardListener: self.
>  	model modelSleep!
> 
> 



More information about the Squeak-dev mailing list