[squeak-dev] The Inbox: Morphic-klub.405.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 29 22:31:24 UTC 2010


A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-klub.405.mcz

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

Name: Morphic-klub.405
Author: klub
Time: 30 March 2010, 12:30:30.382 am
UUID: 8c7b7a5e-efe2-4e04-ba0f-6ef3c6beaffb
Ancestors: Morphic-ar.404

- fix the missing keyboard shortcut for the search bar. Ctrl+<n> activates the search bar where n is an integer between 0 and 9 if there is no menu assigned to that number. The intended usage is Ctrl-0, but some keyboard layouts don't have a key for 0 without modifier keys.

=============== Diff against Morphic-ar.404 ===============

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: 48 " $0 asciiValue " 
- 			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 searchBarMorph ifNotNil: [ :searchBar |
+ 						searchBar activate: anEvent ] ].
- 			each isKindOf: DockingBarItemMorph ]) at: index ifAbsent: [ ^self ].
  		self activate: anEvent.
  		self 
  			selectItem: itemToSelect
  			event: anEvent ]!

Item was added:
+ ----- Method: DockingBarMorph>>searchBarMorph (in category 'events-processing') -----
+ searchBarMorph
+ 
+ 	^self submorphs detect: [ :each | each class = SearchBarMorph ] ifNone: [ nil ]!

Item was added:
+ ----- Method: SearchBarMorph>>activate: (in category 'search') -----
+ activate: event
+ 
+ 	event hand newKeyboardFocus: self.
+ 	self selectAll!




More information about the Squeak-dev mailing list