diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2013-07-17 15:35:10 -0400 |
---|---|---|
committer | Anatoly Spektor <aspektor@redhat.com> | 2013-07-17 15:35:10 -0400 |
commit | 652352e55708ca21c3db22e97622eee2704ec389 (patch) | |
tree | 73f6180f9043de5af51015aecf5d2f86ab3ab7c1 | |
parent | a93fce3f5105854eeb8341437779e5e3e2bb72f1 (diff) | |
download | eclipse.platform.swt-scrollable_cleanup_210.tar.gz eclipse.platform.swt-scrollable_cleanup_210.tar.xz eclipse.platform.swt-scrollable_cleanup_210.zip |
Bug 413200 - Remove code less than 2.8 from Scrollable widgetscrollable_cleanup_210
Signed-off-by: Anatoly Spektor <aspektor@redhat.com>
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java | 24 |
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 b75543c71f..dc4f399b67 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); |