The Trunk: Morphic-mt.1171.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-mt.1171.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1171.mcz

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

Name: Morphic-mt.1171
Author: mt
Time: 9 June 2016, 3:10:58.946908 pm
UUID: 6747743c-ceec-3940-897f-9dc223e4ce04
Ancestors: Morphic-bf.1170

Fixes a regression in the keyboard shortcuts for the world main docking bar.

On Mac OS platforms, recent VMs do not generate correct key-down events but still correct key-stroke events. On Windows platforms, VMs do only generate key-down events for some CTRL modifier combinations, especially numbers, but then no key-strokes. Linux is fine, I guess.

=============== Diff against Morphic-bf.1170 ===============

Item was changed:
  ----- Method: DockingBarMorph>>filterEvent:for: (in category 'events-processing') -----
  filterEvent: aKeyboardEvent for: anObject
  "Provide keyboard shortcuts."
 
  | index itemToSelect |
+
-
- aKeyboardEvent isKeyDown "No #isKeystroke to improve compatibility for all platforms."
- ifFalse: [^ aKeyboardEvent].
-
  aKeyboardEvent controlKeyPressed
  ifFalse: [^ aKeyboardEvent].
+
+ (aKeyboardEvent isKeyDown or: [aKeyboardEvent isKeystroke]) "We also need #keyDown for Windows platforms because CTRL+X does not trigger key strokes there..."
+ ifFalse: [^ aKeyboardEvent].
+
-
  "Search field."
  aKeyboardEvent keyCharacter = $0
  ifTrue: [
  self searchBarMorph ifNotNil: [ :morph |
  morph model activate: aKeyboardEvent in: morph ].
  ^ aKeyboardEvent ignore "hit!!"].
 
  "Select menu items."
  (aKeyboardEvent keyValue
  between: $1 asciiValue
  and: $9 asciiValue)
  ifFalse: [^ aKeyboardEvent].
 
  index := aKeyboardEvent keyValue - $1 asciiValue + 1.
  itemToSelect := (self submorphs select: [ :each |
  each isKindOf: DockingBarItemMorph ])
  at: index
  ifAbsent: [^ aKeyboardEvent].
 
  self activate: aKeyboardEvent.
  self
  selectItem: itemToSelect
  event: aKeyboardEvent.
 
  ^ aKeyboardEvent ignore "hit!!"!