summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-03-08 06:10:27 (EST)
committer Carolyn MacLeod2013-04-09 10:56:23 (EDT)
commit2dd5783988a1155dfa99c9b39f60bede0e8fa91e (patch)
tree88b19ff6475b6fd26f307061f5d411943a33728c
parentf347cc3f2104301dfe43a97e2a3fc8b01277b640 (diff)
downloadeclipse.platform.swt-2dd5783988a1155dfa99c9b39f60bede0e8fa91e.zip
eclipse.platform.swt-2dd5783988a1155dfa99c9b39f60bede0e8fa91e.tar.gz
eclipse.platform.swt-2dd5783988a1155dfa99c9b39f60bede0e8fa91e.tar.bz2
Drop Combo Gtk 2.6 checks.
SWT no longer supports pre-Gtk 2.6 so the checks are not needed at all.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java27
1 files changed, 10 insertions, 17 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
index 7bbd628..ec09386 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java
@@ -436,7 +436,6 @@ void createHandle (int index) {
* fix is to set the pad to 1.
*/
int pad = 0;
- if (OS.GTK_VERSION < OS.VERSION(2, 6, 0)) pad = 1;
OS.g_object_set (textRenderer, OS.ypad, pad, 0);
/*
* Feature in GTK. In version 2.4.9 of GTK, a warning is issued
@@ -788,9 +787,7 @@ public Point getCaretLocation () {
return new Point (0, 0);
}
int index = OS.gtk_editable_get_position (entryHandle);
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
- index = OS.gtk_entry_text_index_to_layout_index (entryHandle, index);
- }
+ index = OS.gtk_entry_text_index_to_layout_index (entryHandle, index);
int [] offset_x = new int [1], offset_y = new int [1];
OS.gtk_entry_get_layout_offsets (entryHandle, offset_x, offset_y);
long /*int*/ layout = OS.gtk_entry_get_layout (entryHandle);
@@ -1260,24 +1257,20 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) {
if (!sendMouseEvent (SWT.MouseDown, gdkEventButton.button, display.clickCount, 0, false, gdkEventButton.time, gdkEventButton.x_root, gdkEventButton.y_root, false, gdkEventButton.state)) {
return 1;
}
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
- if ((style & SWT.READ_ONLY) == 0 && widget == buttonHandle) {
- OS.gtk_widget_grab_focus (entryHandle);
- }
+ if ((style & SWT.READ_ONLY) == 0 && widget == buttonHandle) {
+ OS.gtk_widget_grab_focus (entryHandle);
}
}
break;
}
case OS.GDK_FOCUS_CHANGE: {
- if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) {
- if ((style & SWT.READ_ONLY) == 0) {
- GdkEventFocus gdkEventFocus = new GdkEventFocus ();
- OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
- if (gdkEventFocus.in != 0) {
- OS.gtk_combo_box_set_focus_on_click (handle, false);
- } else {
- OS.gtk_combo_box_set_focus_on_click (handle, true);
- }
+ if ((style & SWT.READ_ONLY) == 0) {
+ GdkEventFocus gdkEventFocus = new GdkEventFocus ();
+ OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof);
+ if (gdkEventFocus.in != 0) {
+ OS.gtk_combo_box_set_focus_on_click (handle, false);
+ } else {
+ OS.gtk_combo_box_set_focus_on_click (handle, true);
}
}
break;