summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Northover <steve>2001-11-15 14:10:47 +0000
committerSteve Northover <steve>2001-11-15 14:10:47 +0000
commita6baca0c93ee7535e1500c50336143cc4b7239f0 (patch)
tree4f353a103dcfd8aa4534853b31a445234a524fe4
parent71383ddf70997eb356fc8596e615d7524d8c3273 (diff)
downloadeclipse.platform.swt-a6baca0c93ee7535e1500c50336143cc4b7239f0.tar.gz
eclipse.platform.swt-a6baca0c93ee7535e1500c50336143cc4b7239f0.tar.xz
eclipse.platform.swt-a6baca0c93ee7535e1500c50336143cc4b7239f0.zip
*** empty log message ***
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java11
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java11
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java26
4 files changed, 24 insertions, 26 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
index b5eddcddc8..e0880f8a49 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/widgets/Composite.java
@@ -569,11 +569,12 @@ public void setTabList (Control [] tabList) {
Control control = tabList [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- Shell shell = control.getShell ();
- while (control != shell && control != this) {
- control = control.parent;
- }
- if (control != this) error (SWT.ERROR_INVALID_PARENT);
+// Shell shell = control.getShell ();
+// while (control != shell && control != this) {
+// control = control.parent;
+// }
+// if (control != this) error (SWT.ERROR_INVALID_PARENT);
+ if (control.parent != this) error (SWT.ERROR_INVALID_PARENT);
}
Control [] children = _getChildren ();
for (int i=0; i<children.length; i++) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
index 269d98ccfa..2f513d6c50 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Composite.java
@@ -369,11 +369,12 @@ public void setTabList (Control [] tabList) {
Control control = tabList [i];
if (control == null) error (SWT.ERROR_INVALID_ARGUMENT);
if (control.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT);
- Shell shell = control.getShell ();
- while (control != shell && control != this) {
- control = control.parent;
- }
- if (control != this) error (SWT.ERROR_INVALID_PARENT);
+// Shell shell = control.getShell ();
+// while (control != shell && control != this) {
+// control = control.parent;
+// }
+// if (control != this) error (SWT.ERROR_INVALID_PARENT);
+ if (control.parent != this) error (SWT.ERROR_INVALID_PARENT);
}
/*
* This code is intentionally commented. It is
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
index 6bc1e0c1f8..211ce93439 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TabFolder.java
@@ -663,7 +663,7 @@ LRESULT WM_GETDLGCODE (int wParam, int lParam) {
/*
* Return DLGC_BUTTON so that mnemonics will be
* processed without needing to press the ALT key
- * when the tab folder has focus.
+ * when the widget has focus.
*/
if (result != null) return result;
return new LRESULT (OS.DLGC_BUTTON);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
index 7073a95f6c..2127f2a887 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/ToolBar.java
@@ -650,6 +650,17 @@ int windowProc () {
return ToolBarProc;
}
+LRESULT WM_GETDLGCODE (int wParam, int lParam) {
+ LRESULT result = super.WM_GETDLGCODE (wParam, lParam);
+ /*
+ * Return DLGC_BUTTON so that mnemonics will be
+ * processed without needing to press the ALT key
+ * when the widget has focus.
+ */
+ if (result != null) return result;
+ return new LRESULT (OS.DLGC_BUTTON);
+}
+
LRESULT WM_COMMAND (int wParam, int lParam) {
/*
* Feature in Windows. When the toolbar window
@@ -672,21 +683,6 @@ LRESULT WM_COMMAND (int wParam, int lParam) {
return LRESULT.ZERO;
}
-LRESULT WM_CHAR (int wParam, int lParam) {
- LRESULT result = super.WM_CHAR (wParam, lParam);
- if (result != null) return result;
- int [] id = new int [1];
- if (OS.SendMessage (handle, OS.TB_MAPACCELERATOR, wParam, id) != 0) {
- int index = OS.SendMessage (handle, OS.TB_COMMANDTOINDEX, id [0], 0);
- if (index != -1) {
- OS.SendMessage (handle, OS.TB_SETHOTITEM, index, 0);
- items [id [0]].click (false);
- return LRESULT.ZERO;
- }
- }
- return result;
-}
-
LRESULT WM_KEYDOWN (int wParam, int lParam) {
LRESULT result = super.WM_KEYDOWN (wParam, lParam);
if (result != null) return result;