summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk
diff options
context:
space:
mode:
authorAlexander Kurtakov <akurtako@redhat.com>2013-03-08 13:10:27 +0200
committerAlexander Kurtakov <akurtako@redhat.com>2013-03-08 13:10:27 +0200
commitdbefe50146adbc679d5bc628d5453b9ca564fc4e (patch)
treee2c497f8ae3b7dfb5e7ad020cae5eb15a7ba4a68 /bundles/org.eclipse.swt/Eclipse SWT/gtk
parentff54d13b51a8adb13dd3c83857ae74c1b27d17b5 (diff)
downloadeclipse.platform.swt-dbefe50146adbc679d5bc628d5453b9ca564fc4e.tar.gz
eclipse.platform.swt-dbefe50146adbc679d5bc628d5453b9ca564fc4e.tar.xz
eclipse.platform.swt-dbefe50146adbc679d5bc628d5453b9ca564fc4e.zip
Drop Combo Gtk 2.6 checks.
SWT no longer supports pre-Gtk 2.6 so the checks are not needed at all.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk')
-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 7bbd628b42..ec0938679c 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;