summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2009-02-02 17:40:24 +0000
committerGrant Gayed <ggayed>2009-02-02 17:40:24 +0000
commit233e4668a94c037724da60880719cf6dd4f06cb9 (patch)
treed6502c3881fc919f56ea6179969024ae1f992ff2
parent4b191d2acf7e8bbd9a6ffb75fb0e9d86c2ad6466 (diff)
downloadeclipse.platform.swt-233e4668a94c037724da60880719cf6dd4f06cb9.tar.gz
eclipse.platform.swt-233e4668a94c037724da60880719cf6dd4f06cb9.tar.xz
eclipse.platform.swt-233e4668a94c037724da60880719cf6dd4f06cb9.zip
*** empty log message ***
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java8
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java4
2 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
index 9fa88048b4..fad2abdd81 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ScrollBar.java
@@ -488,7 +488,13 @@ public void setEnabled (boolean enabled) {
if ((state & DISABLED) != 0) return;
state |= DISABLED;
}
- view.setEnabled(enabled);
+ enableWidget (enabled);
+}
+
+void enableWidget (boolean enabled) {
+ if (!enabled || (state & DISABLED) == 0) {
+ view.setEnabled (enabled);
+ }
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
index 129d1ce6d0..33bdf5b6be 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scrollable.java
@@ -275,8 +275,8 @@ void sendVerticalSelection () {
void enableWidget (boolean enabled) {
super.enableWidget (enabled);
- if (horizontalBar != null) horizontalBar.setEnabled (enabled);
- if (verticalBar != null) verticalBar.setEnabled (enabled);
+ if (horizontalBar != null) horizontalBar.enableWidget (enabled);
+ if (verticalBar != null) verticalBar.enableWidget (enabled);
}
boolean setScrollBarVisible (ScrollBar bar, boolean visible) {