[Pkg] The Trunk: Morphic-ar.358.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Feb 26 15:57:03 UTC 2010


A new version of Morphic was added to project The Trunk:
http://source.squeak.org/trunk/Morphic-ar.358.mcz

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

Name: Morphic-ar.358
Author: ar
Time: 26 February 2010, 4:46:26.845 pm
UUID: 88c7d168-021f-7f40-8892-b7aabfc8b1e8
Ancestors: Morphic-ar.355, Morphic-kb.357, Morphic-kb.356

Merging Morphic-kb.356

 - Changed the docking bar activation shortcut to ctrl-n, where n is the position of the docking bar menu to activate.
 - When selecting a docking bar menu item morph set the keyboard focus to its submenu.
 - If the docking bar can't handle a keystroke it passes the focus to the submenu, and sends the keystroke event to it. 

With these changes you can press ctrl-3, type "wo" and press enter to open a new workspace.

Merging Morphic-kb.357:

- fix for: 0007439: Selection in Trunk text editors does not extend correctly. http://bugs.squeak.org/view.php?id=7439

Put back old code handling shift-clicks. Further investigation needed, to find out why it was removed.

=============== Diff against Morphic-ar.355 ===============

Item was added:
+ ----- Method: DockingBarItemMorph>>select: (in category 'selecting') -----
+ select: evt
+ 	
+ 	super select: evt.
+ 	subMenu ifNotNil: [
+ 		evt hand newKeyboardFocus: subMenu ]!

Item was changed:
  ----- Method: DockingBarMorph>>keyStroke: (in category 'events-processing') -----
  keyStroke: evt 
  
  	| asc |
  	asc := evt keyCharacter asciiValue.
  	asc = 27 ifTrue: [ "escape key" 
  		^self deactivate: evt ].
  	asc = self selectSubmenuKey ifTrue: [
  		self ensureSelectedItem: evt.
  		self selectedItem subMenu ifNotNil: [ :subMenu |
  			subMenu items ifNotEmpty: [
  				subMenu activate: evt.
  				^subMenu moveSelectionDown: 1 event: evt ] ] ].
  	asc = self previousKey ifTrue: [ ^self moveSelectionDown: -1 event: evt ].
+ 	asc = self nextKey ifTrue: [ ^self moveSelectionDown: 1 event: evt ].
+ 	selectedItem ifNotNil: [ 
+ 		selectedItem subMenu ifNotNil: [ :subMenu |
+ 			" If we didn't handle the keystroke, pass the keyboard focus 
+ 			to the open submenu. "
+ 			evt hand newKeyboardFocus: subMenu.
+ 			subMenu keyStroke: evt ] ]!
- 	asc = self nextKey ifTrue: [ ^self moveSelectionDown: 1 event: evt ].!

Item was changed:
  ----- Method: DockingBarMorph>>handleListenEvent: (in category 'events-processing') -----
  handleListenEvent: anEvent
+ 	" I am registered as a keyboardListener of the ActiveHand, 
+ 	watching for ctrl-<n> keystrokes, and upon them if I have 
+ 	an nth menu item, I'll activate myself and select it. "
  	
+ 	(anEvent controlKeyPressed and: [ 
+ 		anEvent keyValue 
+ 			between: 49 " $1 asciiValue " 
+ 			and: 57 " $9 asciiValue " ]) ifTrue: [ 
+ 		| index itemToSelect |
+ 		index := anEvent keyValue - 48.
+ 		itemToSelect := (submorphs select: [ :each | 
+ 			each isKindOf: DockingBarItemMorph ]) at: index ifAbsent: [ ^self ].
+ 		self activate: anEvent.
+ 		self 
+ 			selectItem: itemToSelect
+ 			event: anEvent ]!
- 	(anEvent controlKeyPressed and: [ anEvent keyValue = 96 " ` " ]) ifTrue: [ 
- 		self activate: anEvent ]!

Item was changed:
  ----- Method: TextEditor>>mouseDown: (in category 'events') -----
  mouseDown: evt 
  	"An attempt to break up the old processRedButton code into threee phases"
  	| clickPoint b |
  
  	oldInterval := self selectionInterval.
  	clickPoint := evt cursorPoint.
  	b := paragraph characterBlockAtPoint: clickPoint.
  
  	(paragraph clickAt: clickPoint for: model controller: self) ifTrue: [
  		self markBlock: b.
  		self pointBlock: b.
  		evt hand releaseKeyboardFocus: self.
  		^ self ].
  	
  	evt shiftPressed
  		ifFalse: [
  			self closeTypeIn.
  			self markBlock: b.
+ 			self pointBlock: b ]
+ 		 ifTrue: [
+ 			self closeTypeIn.
+ 			self mouseMove: evt ].
+        self storeSelectionInParagraph!
- 			self pointBlock: b ]!



More information about the Packages mailing list