summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelipe Heidrich <Felipe_Heidrich@ca.ibm.com>2011-07-19 14:20:35 -0400
committerFelipe Heidrich <Felipe_Heidrich@ca.ibm.com>2011-07-19 14:24:15 -0400
commitcaaf50eaf0e8d931eaa9f3e9c353662760983ea0 (patch)
treeb74726f2a2703a9245f30fb8af06dad7f588d89b
parent1e814179c8e3ddd220bc52e818ca30fad6e263c5 (diff)
downloadeclipse.platform.swt-caaf50eaf0e8d931eaa9f3e9c353662760983ea0.tar.gz
eclipse.platform.swt-caaf50eaf0e8d931eaa9f3e9c353662760983ea0.tar.xz
eclipse.platform.swt-caaf50eaf0e8d931eaa9f3e9c353662760983ea0.zip
Bug 352487 - Mnemonic on label field does not work
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java8
-rw-r--r--[-rwxr-xr-x]bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java8
2 files changed, 8 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
index 40f1cb92e3..9323ae3fa5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
@@ -339,12 +339,12 @@ boolean mnemonicHit (char key) {
if (labelHandle == 0) return false;
boolean result = super.mnemonicHit (labelHandle, key);
if (result) {
- Composite control = this.parent;
- while (control != null) {
- Control [] children = control._getChildren ();
+ Control control = this;
+ while (control.parent != null) {
+ Control [] children = control.parent._getChildren ();
int index = 0;
while (index < children.length) {
- if (children [index] == this) break;
+ if (children [index] == control) break;
index++;
}
index++;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
index 10f38adaba..f32a57b30d 100755..100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Label.java
@@ -262,12 +262,12 @@ public String getText () {
}
boolean mnemonicHit (char key) {
- Composite control = this.parent;
- while (control != null) {
- Control [] children = control._getChildren ();
+ Control control = this;
+ while (control.parent != null) {
+ Control [] children = control.parent._getChildren ();
int index = 0;
while (index < children.length) {
- if (children [index] == this) break;
+ if (children [index] == control) break;
index++;
}
index++;