diff options
author | Steve Northover | 2002-01-23 20:58:01 +0000 |
---|---|---|
committer | Steve Northover | 2002-01-23 20:58:01 +0000 |
commit | 20bf6d51528a26e60efa82d957330a1a29c9c9e5 (patch) | |
tree | 8fdd61f0ab31e0fc5dd2fcd64b9a829bbaa6747c | |
parent | e964a36233d5004c1acb324f0083152fd3027185 (diff) | |
download | eclipse.platform.swt-20bf6d51528a26e60efa82d957330a1a29c9c9e5.tar.gz eclipse.platform.swt-20bf6d51528a26e60efa82d957330a1a29c9c9e5.tar.xz eclipse.platform.swt-20bf6d51528a26e60efa82d957330a1a29c9c9e5.zip |
*** empty log message ***
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java index 29853e3619..4b0908639f 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/MenuItem.java @@ -636,16 +636,16 @@ public void setAccelerator (int accelerator) { } else {
keysym = wcsToMbcs ((char) keysym);
}
+ /*
+ * Feature in Motif. Motif does not activate an accelerator
+ * when the CapsLoc, NumLoc and NumLock+CapsLoc keys are pressed.
+ * In order to activate accelerators when these keys are pressed,
+ * it is necessary to look for all of these key sequences.
+ */
String key = ctrl + alt + shift + "<Key>" + keysymName (keysym);
- StringBuffer allKeys = new StringBuffer (key);
- allKeys.append (",Lock ");
- allKeys.append (key);
- allKeys.append (",Mod2 ");
- allKeys.append (key);
- allKeys.append (",Lock Mod2 ");
- allKeys.append (key);
+ String allKeys = key + ",Lock " + key + ",Mod2 " + key + ",Lock Mod2 " + key;
/* Use the character encoding for the default locale */
- byte [] buffer = Converter.wcsToMbcs (null, allKeys.toString (), true);
+ byte [] buffer = Converter.wcsToMbcs (null, allKeys, true);
ptr = OS.XtMalloc (buffer.length);
if (ptr != 0) OS.memmove (ptr, buffer, buffer.length);
}
|