summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop
diff options
context:
space:
mode:
authorSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-02 11:57:24 -0400
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-11-02 11:57:24 -0400
commitd5a464227052c1e758c0c2a306ea3e3b832c9dfb (patch)
treefd6e8463e7e190fb86e761103783a8e0e756a898 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop
parent60a6fb6b981ba4a18d6a3abcdade50a4f3068243 (diff)
downloadeclipse.platform.swt-d5a464227052c1e758c0c2a306ea3e3b832c9dfb.tar.gz
eclipse.platform.swt-d5a464227052c1e758c0c2a306ea3e3b832c9dfb.tar.xz
eclipse.platform.swt-d5a464227052c1e758c0c2a306ea3e3b832c9dfb.zip
add OS.GTK3 flag and use everywhere instead of VERSION(3,0,0)
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/DragSource.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java2
4 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
index 6b555eaee3..0dca6b0a22 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java
@@ -315,7 +315,7 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){
* NOTE: We believe that it is never an error to ungrab when
* a drag is finished.
*/
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
+ if (OS.GTK3) {
long /*int*/ display = OS.gdk_window_get_display(OS.gtk_widget_get_window(widget));
long /*int*/ device_manager = OS.gdk_display_get_device_manager(display);
long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer(device_manager);
@@ -331,7 +331,7 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){
if (context != 0) {
long /*int*/ dest_window = 0;
int action = 0;
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
+ if (OS.GTK3) {
dest_window = OS.gdk_drag_context_get_dest_window(context);
action = OS.gdk_drag_context_get_selected_action(context);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
index 8246075242..ea2a3d7b9e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java
@@ -747,7 +747,7 @@ boolean setEventData(long /*int*/ context, int x, int y, int time, DNDEvent even
if (context == 0) return false;
long /*int*/ targets = 0;
int actions = 0;
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) {
+ if (OS.GTK3) {
targets = OS.gdk_drag_context_list_targets(context);
actions = OS.gdk_drag_context_get_actions(context);
} else {
@@ -836,7 +836,7 @@ void updateDragOverHover(long delay, DNDEvent event) {
}
long /*int*/ gdk_window_get_device_position (long /*int*/ window, int[] x, int[] y, int[] mask) {
- if (OS.GTK_VERSION >= OS.VERSION (3, 0, 0)) {
+ if (OS.GTK3) {
long /*int*/ display = 0;
if( window != 0) {
display = OS.gdk_window_get_display (window);
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 29aa6e5a42..aee782f2bd 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
@@ -83,7 +83,7 @@ public class TableDragSourceEffect extends DragSourceEffect {
//TEMPORARY CODE
if (table.isListening(SWT.EraseItem) || table.isListening (SWT.PaintItem)) return null;
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) return null;
+ if (OS.GTK3) return null;
/*
* Bug in GTK. gtk_tree_selection_get_selected_rows() segmentation faults
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 a8d8ebf03f..d7a7f544bb 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
@@ -82,7 +82,7 @@ public class TreeDragSourceEffect extends DragSourceEffect {
//TEMPORARY CODE
if (tree.isListening(SWT.EraseItem) || tree.isListening (SWT.PaintItem)) return null;
- if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) return null;
+ if (OS.GTK3) return null;
/*
* Bug in GTK. gtk_tree_selection_get_selected_rows() segmentation faults