summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
diff options
context:
space:
mode:
authorFelipe Heidrich <fheidric>2003-08-20 20:59:07 +0000
committerFelipe Heidrich <fheidric>2003-08-20 20:59:07 +0000
commit3eabcb22d73aefc269d4b36fdd0811e42b99c940 (patch)
tree0177e32df33814b9e94f19b764d3effdc8a4aeb0 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
parent56ee8e3714ebd2faeeedfa8f2c69588990cf85e7 (diff)
downloadeclipse.platform.swt-3eabcb22d73aefc269d4b36fdd0811e42b99c940.tar.gz
eclipse.platform.swt-3eabcb22d73aefc269d4b36fdd0811e42b99c940.tar.xz
eclipse.platform.swt-3eabcb22d73aefc269d4b36fdd0811e42b99c940.zip
setParent
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java30
1 files changed, 21 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
index 952237f785..783a269290 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolBar.java
@@ -112,6 +112,17 @@ Control [] _getChildren () {
return newChildren;
}
+static int checkStyle (int style) {
+ /*
+ * Even though it is legal to create this widget
+ * with scroll bars, they serve no useful purpose
+ * because they do not automatically scroll the
+ * widget's client area. The fix is to clear
+ * the SWT style.
+ */
+ return style & ~(SWT.H_SCROLL | SWT.V_SCROLL);
+}
+
void createHandle (int index) {
state |= HANDLE;
fixedHandle = OS.gtk_fixed_new ();
@@ -304,15 +315,16 @@ void releaseWidget () {
tooltipsHandle = 0;
}
-static int checkStyle (int style) {
- /*
- * Even though it is legal to create this widget
- * with scroll bars, they serve no useful purpose
- * because they do not automatically scroll the
- * widget's client area. The fix is to clear
- * the SWT style.
- */
- return style & ~(SWT.H_SCROLL | SWT.V_SCROLL);
+void removeControl (Control control) {
+ super.removeControl (control);
+ // TEMPORARY CODE
+ ToolItem [] items = getItems ();
+ for (int i=0; i<items.length; i++) {
+ ToolItem item = items [i];
+ if (item != null && item.control == control) {
+ item.setControl (null);
+ }
+ }
}
void setFontDescription (int font) {