summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAnatoly Spektor2013-07-17 15:35:10 (EDT)
committer Arun Thondapu2013-07-18 05:27:50 (EDT)
commit599e467b0978b4d9b759eab92e551eb3c58a6f09 (patch)
tree73f6180f9043de5af51015aecf5d2f86ab3ab7c1
parenta93fce3f5105854eeb8341437779e5e3e2bb72f1 (diff)
downloadeclipse.platform.swt-599e467b0978b4d9b759eab92e551eb3c58a6f09.zip
eclipse.platform.swt-599e467b0978b4d9b759eab92e551eb3c58a6f09.tar.gz
eclipse.platform.swt-599e467b0978b4d9b759eab92e551eb3c58a6f09.tar.bz2
Bug 413200 - Remove code less than 2.8 from Scrollable widget
Signed-off-by: Anatoly Spektor <aspektor@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java24
1 files changed, 4 insertions, 20 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
index b75543c..dc4f399 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java
@@ -136,18 +136,10 @@ ScrollBar createScrollBar (int style) {
bar.display = display;
bar.state |= HANDLE;
if ((style & SWT.H_SCROLL) != 0) {
- if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
- bar.handle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (scrolledHandle);
- } else {
- bar.handle = OS.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
- }
+ bar.handle = OS.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
bar.adjustmentHandle = OS.gtk_scrolled_window_get_hadjustment (scrolledHandle);
} else {
- if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
- bar.handle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle);
- } else {
- bar.handle = OS.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
- }
+ bar.handle = OS.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
bar.adjustmentHandle = OS.gtk_scrolled_window_get_vadjustment (scrolledHandle);
}
bar.setOrientation (true);
@@ -334,11 +326,7 @@ long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) {
int hScrollBarWidth() {
if (horizontalBar==null) return 0;
long /*int*/ hBarHandle = 0;
- if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
- hBarHandle = OS.GTK_SCROLLED_WINDOW_HSCROLLBAR (scrolledHandle);
- } else {
- hBarHandle = OS.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
- }
+ hBarHandle = OS.gtk_scrolled_window_get_hscrollbar (scrolledHandle);
if (hBarHandle==0) return 0;
GtkRequisition requisition = new GtkRequisition();
gtk_widget_get_preferred_size (hBarHandle, requisition);
@@ -464,11 +452,7 @@ void updateScrollBarValue (ScrollBar bar) {
int vScrollBarWidth() {
if (verticalBar == null) return 0;
long /*int*/ vBarHandle = 0;
- if (OS.GTK_VERSION < OS.VERSION(2, 8, 0)) {
- vBarHandle = OS.GTK_SCROLLED_WINDOW_VSCROLLBAR (scrolledHandle);
- } else {
- vBarHandle = OS.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
- }
+ vBarHandle = OS.gtk_scrolled_window_get_vscrollbar (scrolledHandle);
if (vBarHandle == 0) return 0;
GtkRequisition requisition = new GtkRequisition();
gtk_widget_get_preferred_size (vBarHandle, requisition);