[squeak-dev] The Trunk: Morphic-cmm.409.mcz
leves at elte.hu
Mon Apr 5 10:19:53 UTC 2010
On Mon, 5 Apr 2010, commits at source.squeak.org wrote:
> Chris Muller uploaded a new version of Morphic to project The Trunk:
> ==================== Summary ====================
> Name: Morphic-cmm.409
> Author: cmm
> Time: 4 April 2010, 7:38:12.513 pm
> UUID: fccf6217-a81a-4ebc-94be-ec0e36a05b7a
> Ancestors: Morphic-ar.408
> Changed hot-key for search-bar activation to Control+7 instead of Control+7, 8, or 9. Control+9 was already taken for a very useful, legacy function (surround with parenthesis). This is also consistent with the other hot-keys on the DockingBar since the search-bar is the 7th item over, not the 9th. There are a limited number of shortcut keys still available on the keyboard, so no function deserves three separate hot-keys.
The intention was Ctrl+0, but we decided to add it to 7-8-9 too, because
some keyboard layouts don't have 0 without other modifiers.
Ctrl+9 was unused, Ctrl+( (which is Ctrl+Shift+9) is used for surrounding
There's no guarantee that the Search Bar will be always the 7th item in
the docking bar, therefore 0 is a better choice IMHO, since 0 is usuall
on the right side of the keyboard, just like the Search Bar is on the
right side of the screen (if the docking bar is up or down).
> =============== Diff against Morphic-ar.408 ===============
> 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 "
> + and: 55 " $7 asciiValue " ]) ifTrue: [
> - 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 ] ].
> self activate: anEvent.
> selectItem: itemToSelect
> event: anEvent ]!
More information about the Squeak-dev