summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop
diff options
context:
space:
mode:
authorAlexander Kurtakov <akurtako@redhat.com>2012-10-16 10:46:31 +0300
committerAlexander Kurtakov <akurtako@redhat.com>2012-10-16 10:46:31 +0300
commit801ec1483559446c0d86f80fed29f2453a706def (patch)
treec3dec3f3e692925364a1d3b43ad0df35765d4922 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop
parenta3e032800e98721779dad6898ea6e135501045b9 (diff)
downloadeclipse.platform.swt-801ec1483559446c0d86f80fed29f2453a706def.tar.gz
eclipse.platform.swt-801ec1483559446c0d86f80fed29f2453a706def.tar.xz
eclipse.platform.swt-801ec1483559446c0d86f80fed29f2453a706def.zip
Remove Gtk 2.2-2.4 checks.
Now that we require 2.6.0+ it makes no sense to clutter the code with useless checks.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java3
3 files changed, 2 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
index ffa0b07bf6..4587cae22f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java
@@ -84,8 +84,6 @@ public void javaToNative(Object object, TransferData transferData) {
if (!checkImage(object) || !isSupportedType(transferData)) {
DND.error(DND.ERROR_INVALID_DATA);
}
- if (OS.GTK_VERSION < OS.VERSION (2, 4, 0)) return;
-
ImageData imgData = (ImageData)object;
if (imgData == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
Image image = new Image(Display.getCurrent(), imgData);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
index e5917f79f7..4d0fee4603 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java
@@ -80,7 +80,6 @@ public class TableDragSourceEffect extends DragSourceEffect {
dragSourceImage = null;
Table table = (Table) control;
- if (OS.GTK_VERSION < OS.VERSION (2, 2, 0)) return null;
//TEMPORARY CODE
if (table.isListening(SWT.EraseItem) || table.isListening (SWT.PaintItem)) return null;
/*
@@ -90,7 +89,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
*/
long /*int*/ handle = table.handle;
long /*int*/ selection = OS.gtk_tree_view_get_selection (handle);
- long /*int*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new long /*int*/ [1] : null;
+ long /*int*/ [] model = null;
long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model);
if (list == 0) return null;
int count = Math.min(10, OS.g_list_length (list));
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
index a4f51d4504..b22f77ccfe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java
@@ -79,7 +79,6 @@ public class TreeDragSourceEffect extends DragSourceEffect {
dragSourceImage = null;
Tree tree = (Tree) control;
- if (OS.GTK_VERSION < OS.VERSION (2, 2, 0)) return null;
//TEMPORARY CODE
if (tree.isListening(SWT.EraseItem) || tree.isListening (SWT.PaintItem)) return null;
/*
@@ -89,7 +88,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
*/
long /*int*/ handle = tree.handle;
long /*int*/ selection = OS.gtk_tree_view_get_selection (handle);
- long /*int*/ [] model = OS.GTK_VERSION < OS.VERSION (2, 2, 4) ? new long /*int*/ [1] : null;
+ long /*int*/ [] model = null;
long /*int*/ list = OS.gtk_tree_selection_get_selected_rows (selection, model);
if (list == 0) return null;
int count = Math.min(10, OS.g_list_length (list));