Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-12-03 19:01:53 +0000
committerEric Williams2018-12-11 18:34:21 +0000
commit285c866c3270b67bc5c6c408538cb861a7476c15 (patch)
tree57999c47e6ecceb23356cdc94ce5d7e7d8575a0c
parent7e9b37025bfdeb06191478d954b57429bf2300cf (diff)
downloadeclipse.platform.swt-285c866c3270b67bc5c6c408538cb861a7476c15.tar.gz
eclipse.platform.swt-285c866c3270b67bc5c6c408538cb861a7476c15.tar.xz
eclipse.platform.swt-285c866c3270b67bc5c6c408538cb861a7476c15.zip
Bug 541862: [GTK3] Increase minimum GTK3 version to 3.10
Remove old 3.8 and below code. Change-Id: Ib3cb77939a7146396c36e982a93e135b18318855 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c94
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java75
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java19
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java4
21 files changed, 38 insertions, 271 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 50b0659b0a..98d7b4f905 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
@@ -313,11 +313,7 @@ void drag(Event dragEvent) {
int actions = opToOsOp(getStyle());
Image image = event.image;
long /*int*/ context;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0)) {
- context = GTK.gtk_drag_begin_with_coordinates(control.handle, targetList, actions, 1, 0, -1, -1);
- } else {
- context = GTK.gtk_drag_begin(control.handle, targetList, actions, 1, 0);
- }
+ context = GTK.gtk_drag_begin_with_coordinates(control.handle, targetList, actions, 1, 0, -1, -1);
if (context != 0 && image != null) {
GTK.gtk_drag_set_icon_surface(context, image.surface);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index f2f5628966..259b232364 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -4656,26 +4656,6 @@ JNIEXPORT jint JNICALL GTK_NATIVE(_1gtk_1dialog_1run)
}
#endif
-#ifndef NO__1gtk_1drag_1begin
-JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1drag_1begin)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jintLong arg4)
-{
- jintLong rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1drag_1begin_FUNC);
-/*
- rc = (jintLong)gtk_drag_begin((GtkWidget *)arg0, (GtkTargetList *)arg1, (GdkDragAction)arg2, (gint)arg3, (GdkEvent *)arg4);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_drag_begin)
- if (fp) {
- rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GtkWidget *, GtkTargetList *, GdkDragAction, gint, GdkEvent *))fp)((GtkWidget *)arg0, (GtkTargetList *)arg1, (GdkDragAction)arg2, (gint)arg3, (GdkEvent *)arg4);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1drag_1begin_FUNC);
- return rc;
-}
-#endif
-
#if (!defined(NO__1gtk_1drag_1begin_1with_1coordinates__IIIIII) && !defined(JNI64)) || (!defined(NO__1gtk_1drag_1begin_1with_1coordinates__JJJIII) && defined(JNI64))
#ifndef JNI64
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1drag_1begin_1with_1coordinates__IIIIII)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5)
@@ -6279,24 +6259,6 @@ fail:
}
#endif
-#ifndef NO__1gtk_1icon_1info_1free
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1icon_1info_1free)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1icon_1info_1free_FUNC);
-/*
- gtk_icon_info_free(arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_icon_info_free)
- if (fp) {
- ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1icon_1info_1free_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1icon_1info_1load_1icon
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1icon_1info_1load_1icon)
(JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1)
@@ -8517,24 +8479,6 @@ JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1scrollbar_1new)
}
#endif
-#ifndef NO__1gtk_1scrolled_1window_1add_1with_1viewport
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1add_1with_1viewport)
- (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1add_1with_1viewport_FUNC);
-/*
- gtk_scrolled_window_add_with_viewport((GtkScrolledWindow *)arg0, (GtkWidget *)arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_scrolled_window_add_with_viewport)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkScrolledWindow *, GtkWidget *))fp)((GtkScrolledWindow *)arg0, (GtkWidget *)arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1add_1with_1viewport_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1scrolled_1window_1get_1hadjustment
JNIEXPORT jintLong JNICALL GTK_NATIVE(_1gtk_1scrolled_1window_1get_1hadjustment)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -12927,26 +12871,6 @@ JNIEXPORT jboolean JNICALL GTK_NATIVE(_1gtk_1window_1get_1modal)
}
#endif
-#ifndef NO__1gtk_1window_1get_1opacity
-JNIEXPORT jdouble JNICALL GTK_NATIVE(_1gtk_1window_1get_1opacity)
- (JNIEnv *env, jclass that, jintLong arg0)
-{
- jdouble rc = 0;
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1get_1opacity_FUNC);
-/*
- rc = (jdouble)gtk_window_get_opacity((GtkWindow *)arg0);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_window_get_opacity)
- if (fp) {
- rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GtkWindow *))fp)((GtkWindow *)arg0);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1get_1opacity_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO__1gtk_1window_1get_1position
JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1get_1position)
(JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2)
@@ -13182,24 +13106,6 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1modal)
}
#endif
-#ifndef NO__1gtk_1window_1set_1opacity
-JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1opacity)
- (JNIEnv *env, jclass that, jintLong arg0, jdouble arg1)
-{
- GTK_NATIVE_ENTER(env, that, _1gtk_1window_1set_1opacity_FUNC);
-/*
- gtk_window_set_opacity((GtkWindow *)arg0, arg1);
-*/
- {
- GTK_LOAD_FUNCTION(fp, gtk_window_set_opacity)
- if (fp) {
- ((void (CALLING_CONVENTION*)(GtkWindow *, jdouble))fp)((GtkWindow *)arg0, arg1);
- }
- }
- GTK_NATIVE_EXIT(env, that, _1gtk_1window_1set_1opacity_FUNC);
-}
-#endif
-
#ifndef NO__1gtk_1window_1set_1resizable
JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1window_1set_1resizable)
(JNIEnv *env, jclass that, jintLong arg0, jboolean arg1)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
index 49d1f175c3..bfa51e1a99 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c
@@ -417,7 +417,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1css_1provider_1to_1string",
"_1gtk_1dialog_1add_1button",
"_1gtk_1dialog_1run",
- "_1gtk_1drag_1begin",
#ifndef JNI64
"_1gtk_1drag_1begin_1with_1coordinates__IIIIII",
#else
@@ -552,7 +551,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1grab_1get_1current",
"_1gtk_1grab_1remove",
"_1gtk_1hsv_1to_1rgb",
- "_1gtk_1icon_1info_1free",
"_1gtk_1icon_1info_1load_1icon",
"_1gtk_1icon_1theme_1get_1default",
"_1gtk_1icon_1theme_1load_1icon",
@@ -766,7 +764,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1scale_1set_1draw_1value",
"_1gtk_1scrollable_1get_1vadjustment",
"_1gtk_1scrollbar_1new",
- "_1gtk_1scrolled_1window_1add_1with_1viewport",
"_1gtk_1scrolled_1window_1get_1hadjustment",
"_1gtk_1scrolled_1window_1get_1hscrollbar",
"_1gtk_1scrolled_1window_1get_1overlay_1scrolling",
@@ -1155,7 +1152,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1window_1get_1icon_1list",
"_1gtk_1window_1get_1mnemonic_1modifier",
"_1gtk_1window_1get_1modal",
- "_1gtk_1window_1get_1opacity",
"_1gtk_1window_1get_1position",
"_1gtk_1window_1get_1size",
"_1gtk_1window_1group_1add_1window",
@@ -1177,7 +1173,6 @@ char * GTK_nativeFunctionNames[] = {
"_1gtk_1window_1set_1icon_1list",
"_1gtk_1window_1set_1keep_1above",
"_1gtk_1window_1set_1modal",
- "_1gtk_1window_1set_1opacity",
"_1gtk_1window_1set_1resizable",
"_1gtk_1window_1set_1skip_1taskbar_1hint",
"_1gtk_1window_1set_1title",
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
index fe65213b89..ab820ffef4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h
@@ -415,7 +415,6 @@ typedef enum {
_1gtk_1css_1provider_1to_1string_FUNC,
_1gtk_1dialog_1add_1button_FUNC,
_1gtk_1dialog_1run_FUNC,
- _1gtk_1drag_1begin_FUNC,
#ifndef JNI64
_1gtk_1drag_1begin_1with_1coordinates__IIIIII_FUNC,
#else
@@ -550,7 +549,6 @@ typedef enum {
_1gtk_1grab_1get_1current_FUNC,
_1gtk_1grab_1remove_FUNC,
_1gtk_1hsv_1to_1rgb_FUNC,
- _1gtk_1icon_1info_1free_FUNC,
_1gtk_1icon_1info_1load_1icon_FUNC,
_1gtk_1icon_1theme_1get_1default_FUNC,
_1gtk_1icon_1theme_1load_1icon_FUNC,
@@ -764,7 +762,6 @@ typedef enum {
_1gtk_1scale_1set_1draw_1value_FUNC,
_1gtk_1scrollable_1get_1vadjustment_FUNC,
_1gtk_1scrollbar_1new_FUNC,
- _1gtk_1scrolled_1window_1add_1with_1viewport_FUNC,
_1gtk_1scrolled_1window_1get_1hadjustment_FUNC,
_1gtk_1scrolled_1window_1get_1hscrollbar_FUNC,
_1gtk_1scrolled_1window_1get_1overlay_1scrolling_FUNC,
@@ -1153,7 +1150,6 @@ typedef enum {
_1gtk_1window_1get_1icon_1list_FUNC,
_1gtk_1window_1get_1mnemonic_1modifier_FUNC,
_1gtk_1window_1get_1modal_FUNC,
- _1gtk_1window_1get_1opacity_FUNC,
_1gtk_1window_1get_1position_FUNC,
_1gtk_1window_1get_1size_FUNC,
_1gtk_1window_1group_1add_1window_FUNC,
@@ -1175,7 +1171,6 @@ typedef enum {
_1gtk_1window_1set_1icon_1list_FUNC,
_1gtk_1window_1set_1keep_1above_FUNC,
_1gtk_1window_1set_1modal_FUNC,
- _1gtk_1window_1set_1opacity_FUNC,
_1gtk_1window_1set_1resizable_FUNC,
_1gtk_1window_1set_1skip_1taskbar_1hint_FUNC,
_1gtk_1window_1set_1title_FUNC,
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index 83957e0607..a711204484 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -191,7 +191,6 @@ public class GTK extends OS {
public static final byte[] gtk_cursor_blink_time = OS.ascii("gtk-cursor-blink-time");
public static final byte[] gtk_double_click_time = OS.ascii("gtk-double-click-time");
public static final byte[] gtk_entry_select_on_focus = OS.ascii("gtk-entry-select-on-focus");
- public static final byte[] gtk_show_input_method_menu = OS.ascii("gtk-show-input-method-menu");
public static final byte[] gtk_style_property_font = OS.ascii("font");
public static final byte[] gtk_menu_bar_accel = OS.ascii("gtk-menu-bar-accel");
public static final byte[] gtk_menu_images = OS.ascii("gtk-menu-images");
@@ -1638,24 +1637,6 @@ public class GTK extends OS {
* @param actions cast=(GdkDragAction)
* @param button cast=(gint)
* @param event cast=(GdkEvent *)
- */
- public static final native long /*int*/ _gtk_drag_begin(long /*int*/ widget, long /*int*/ targets, int actions, int button, long /*int*/ event);
- /** [GTK2/GTK3; 3.10 deprecated, replaced] */
- public static final long /*int*/ gtk_drag_begin(long /*int*/ widget, long /*int*/ targets, int actions, int button, long /*int*/ event) {
- lock.lock();
- try {
- return _gtk_drag_begin(widget, targets, actions, button, event);
- } finally {
- lock.unlock();
- }
- }
- /**
- * @method flags=dynamic
- * @param widget cast=(GtkWidget *)
- * @param targets cast=(GtkTargetList *)
- * @param actions cast=(GdkDragAction)
- * @param button cast=(gint)
- * @param event cast=(GdkEvent *)
* @param x cast=(gint)
* @param y cast=(gint)
*/
@@ -3223,19 +3204,6 @@ public class GTK extends OS {
lock.unlock();
}
}
- /**
- * @method flags=dynamic
- */
- public static final native void _gtk_icon_info_free(long /*int*/ icon_info);
- /** [GTK2/GTK3; 3.8 deprecated, replaced] */
- public static final void gtk_icon_info_free(long /*int*/ icon_info) {
- lock.lock();
- try {
- _gtk_icon_info_free(icon_info);
- } finally {
- lock.unlock();
- }
- }
/** @return cast=(GtkIconTheme *) */
public static final native long /*int*/ _gtk_icon_theme_get_default();
public static final long /*int*/ gtk_icon_theme_get_default() {
@@ -5341,21 +5309,6 @@ public class GTK extends OS {
lock.unlock();
}
}
- /**
- * @method flags=dynamic
- * @param scrolled_window cast=(GtkScrolledWindow *)
- * @param child cast=(GtkWidget *)
- */
- public static final native void _gtk_scrolled_window_add_with_viewport(long /*int*/ scrolled_window, long /*int*/ child);
- /** [GTK2/GTK3; 3.8 deprecated, replaced] */
- public static final void gtk_scrolled_window_add_with_viewport(long /*int*/ scrolled_window, long /*int*/ child) {
- lock.lock();
- try {
- _gtk_scrolled_window_add_with_viewport(scrolled_window, child);
- } finally {
- lock.unlock();
- }
- }
/** @param scrolled_window cast=(GtkScrolledWindow *) */
public static final native long /*int*/ _gtk_scrolled_window_get_hadjustment(long /*int*/ scrolled_window);
public static final long /*int*/ gtk_scrolled_window_get_hadjustment(long /*int*/ scrolled_window) {
@@ -8983,20 +8936,6 @@ public class GTK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param window cast=(GtkWindow *)
- */
- public static final native double _gtk_window_get_opacity (long /*int*/ window);
- /** [GTK3; 3.8 deprecated, replaced] */
- public static final double gtk_window_get_opacity (long /*int*/ window) {
- lock.lock();
- try {
- return _gtk_window_get_opacity (window);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param handle cast=(GtkWindow *)
* @param x cast=(gint *)
* @param y cast=(gint *)
@@ -9276,20 +9215,6 @@ public class GTK extends OS {
}
}
/**
- * @method flags=dynamic
- * @param window cast=(GtkWindow *)
- */
- public static final native void _gtk_window_set_opacity(long /*int*/ window, double opacity);
- /** [GTK2/GTK3; 3.8 deprecated, replaced] */
- public static final void gtk_window_set_opacity(long /*int*/ window, double opacity) {
- lock.lock();
- try {
- _gtk_window_set_opacity(window, opacity);
- } finally {
- lock.unlock();
- }
- }
- /**
* @param widget cast=(GtkWidget *)
* @param tip_text cast=(const gchar *)
*/
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
index d90f645e48..d09b65ba57 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java
@@ -185,11 +185,7 @@ public ImageData getImageData() {
data.bytesPerLine = stride;
}
}
- if (GTK.GTK_VERSION >= OS.VERSION(3, 8, 0)) {
- OS.g_object_unref(gicon_info);
- } else {
- GTK.gtk_icon_info_free(gicon_info);
- }
+ OS.g_object_unref(gicon_info);
}
OS.g_object_unref(gicon);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
index ca1865c51f..a71d1eb3ca 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java
@@ -672,7 +672,7 @@ protected void init () {
long /*int*/ [] defaultFontArray = new long /*int*/ [1];
long /*int*/ defaultFont;
long /*int*/ context = GTK.gtk_widget_get_style_context (shellHandle);
- if ((GTK.GTK_VERSION < OS.VERSION(3, 8, 0))|| ("ppc64le".equals(System.getProperty("os.arch")))) {
+ if ("ppc64le".equals(System.getProperty("os.arch"))) {
defaultFont = GTK.gtk_style_context_get_font (context, GTK.GTK_STATE_FLAG_NORMAL);
} else if (GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
GTK.gtk_style_context_save(context);
@@ -1081,7 +1081,7 @@ protected int getDeviceZoom() {
long /*int*/ monitor = GDK.gdk_display_get_monitor_at_point(display, 0, 0);
int scale = GDK.gdk_monitor_get_scale_factor(monitor);
dpi = dpi * scale;
- } else if (GTK.GTK_VERSION > OS.VERSION(3, 9, 0)) {
+ } else {
long /*int*/ screen = GDK.gdk_screen_get_default();
dpi = (int) GDK.gdk_screen_get_resolution (screen);
if (dpi <= 0) dpi = 96; // gdk_screen_get_resolution returns -1 in case of error
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
index 5b503353c3..1c300e6431 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java
@@ -3121,7 +3121,7 @@ public void setClipping(Rectangle rect) {
setClippingInPixels(DPIUtil.autoScaleUp(drawable, rect));
}
void setClippingInPixels(Rectangle rect) {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 9, 0) && (drawable instanceof Tree || drawable instanceof Table)) {
+ if (drawable instanceof Tree || drawable instanceof Table) {
return; //FIXME: This is an atrocious hack for bug 446075
}
if (rect == null) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
index d8ef8fed3f..6d90fae241 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java
@@ -800,12 +800,6 @@ void _setAlignment (int alignment) {
@Override
void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rgba) {
background = rgba;
- //Pre GTK 3.10 doesn't handle CSS background color very well for GTK Check/Radio button.
- // 3.10.3 as it was the latest to affect theming in button.
- if (GTK.GTK_VERSION < OS.VERSION(3, 10, 3) && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
- super.setBackgroundGdkRGBA (context, handle, rgba);
- return;
- }
// Form background CSS string
String css ="* {background : ";
String color = display.gtk_rgba_to_css_string (rgba);
@@ -919,8 +913,7 @@ void setForegroundGdkRGBA (GdkRGBA rgba) {
* Giving them a border color that matches the text color ensures consistent visibility
* across most themes. See bug 463733.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0) && GTK.GTK_VERSION < OS.VERSION (3, 16, 0) &&
- (style & (SWT.CHECK | SWT.RADIO)) != 0) {
+ if (GTK.GTK_VERSION < OS.VERSION (3, 16, 0) && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
gtk_swt_set_border_color (rgba);
}
}
@@ -1177,7 +1170,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
*/
switch ((int)/*64*/user_data) {
case DRAW: {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 9, 0) && paintHandle() == handle) {
+ if (paintHandle() == handle) {
return gtk_draw(handle, arg0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index f58399f729..64bd9228a6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -133,7 +133,7 @@ public Composite (Composite parent, int style) {
* Cache the NO_BACKGROUND flag for use in the Cairo setRegion()
* implementation. Only relevant to GTK3.10+, see bug 475784.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0) && (style & SWT.NO_BACKGROUND) != 0) {
+ if ((style & SWT.NO_BACKGROUND) != 0) {
cachedNoBackground = true;
}
}
@@ -1533,8 +1533,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
* consider moving this fix higher into Control's setBound(...) method instead.
*/
long /*int*/ topHandle = topHandle ();
- if (GTK.GTK_VERSION >= OS.VERSION (3, 8, 0)
- && fixedHandle != 0 && handle != 0
+ if (fixedHandle != 0 && handle != 0
&& getVisible() && !GTK.gtk_widget_get_visible(topHandle) //if SWT State is not HIDDEN, but widget is hidden on GTK side.
&& topHandle == fixedHandle && width > 0 && height > 0 && resize) {
GTK.gtk_widget_show(topHandle);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index 2ab5306bbe..452267192e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -1053,7 +1053,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize
* this might cause unnecessary focus change events. In case this happens, try remove
* gtk_widget_hide call or avoid setting bounds on invisible widgets.
*/
- if (GTK.GTK_VERSION >= OS.VERSION (3, 8, 0) && !GTK.gtk_widget_get_visible(topHandle)) {
+ if (!GTK.gtk_widget_get_visible(topHandle)) {
Control focusControl = display.getFocusControl();
GTK.gtk_widget_show(topHandle);
gtk_widget_get_preferred_size (topHandle, requisition);
@@ -1289,7 +1289,7 @@ public void setRegion (Region region) {
this.region = region;
long /*int*/ topHandle = topHandle ();
- if (GTK.GTK_VERSION < OS.VERSION(3, 10, 0) || OS.G_OBJECT_TYPE(topHandle) == GTK.GTK_TYPE_WINDOW()) {
+ if (OS.G_OBJECT_TYPE(topHandle) == GTK.GTK_TYPE_WINDOW()) {
GTK.gtk_widget_shape_combine_region(topHandle, shape_region);
/*
* Bug in GTK: on Wayland, pixels in window outside shape_region
@@ -2943,7 +2943,7 @@ long /*int*/ getFontDescription () {
long /*int*/ fontHandle = fontHandle ();
long /*int*/ [] fontDesc = new long /*int*/ [1];
long /*int*/ context = GTK.gtk_widget_get_style_context (fontHandle);
- if ((GTK.GTK_VERSION < OS.VERSION(3, 8, 0) || ("ppc64le".equals(System.getProperty("os.arch"))))) {
+ if ("ppc64le".equals(System.getProperty("os.arch"))) {
return GTK.gtk_style_context_get_font(context, GTK.GTK_STATE_FLAG_NORMAL);
} else if (GTK.GTK_VERSION >= OS.VERSION(3, 18, 0)) {
GTK.gtk_style_context_save(context);
@@ -3515,7 +3515,7 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
*/
if (drawRegion) data.regionSet = eventRegion;
// data.damageRgn = gdkEvent.region;
- if (GTK.GTK_VERSION <= OS.VERSION (3, 9, 0) || GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
+ if (GTK.GTK_VERSION >= OS.VERSION (3, 14, 0)) {
data.cairo = cairo;
}
GC gc = event.gc = GC.gtk_new (this, data);
@@ -6299,7 +6299,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
break;
}
case DRAW: {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0) && paintHandle() == handle && drawRegion) {
+ if (paintHandle() == handle && drawRegion) {
return gtk_draw(handle, arg0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index 3e3c90b73c..1b29df490f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -468,7 +468,7 @@ public class Display extends Device {
/* GTK Version */
static final int GTK3_MAJOR = 3;
- static final int GTK3_MINOR = 8;
+ static final int GTK3_MINOR = 10;
static final int GTK3_MICRO = 0;
/* Display Data */
@@ -5952,7 +5952,7 @@ static int _getDeviceZoom (long /*int*/ monitor_num) {
long /*int*/ monitor = GDK.gdk_display_get_monitor_at_point(display, 0, 0);
int scale = GDK.gdk_monitor_get_scale_factor(monitor);
dpi = dpi * scale;
- } else if (GTK.GTK_VERSION > OS.VERSION(3, 9, 0)) {
+ } else {
long /*int*/ screen = GDK.gdk_screen_get_default ();
dpi = (int) GDK.gdk_screen_get_resolution (screen);
if (dpi <= 0) dpi = 96; // gdk_screen_get_resolution returns -1 in case of error
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
index ac750606eb..ee85511ece 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java
@@ -144,11 +144,7 @@ void createHandle (int index) {
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
GTK.gtk_scrolled_window_set_policy (scrolledHandle, GTK.GTK_POLICY_NEVER, GTK.GTK_POLICY_AUTOMATIC);
GTK.gtk_container_add (fixedHandle, scrolledHandle);
- if (GTK.GTK_VERSION < OS.VERSION(3, 8, 0)) {
- GTK.gtk_scrolled_window_add_with_viewport (scrolledHandle, handle);
- } else {
- GTK.gtk_container_add(scrolledHandle, handle);
- }
+ GTK.gtk_container_add(scrolledHandle, handle);
long /*int*/ viewport = GTK.gtk_bin_get_child (scrolledHandle);
GTK.gtk_viewport_set_shadow_type (viewport, GTK.GTK_SHADOW_NONE);
} else {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
index c6617193f3..43f0474ed3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java
@@ -710,7 +710,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
*/
switch ((int)/*64*/user_data) {
case DRAW: {
- if (GTK.GTK_VERSION >= OS.VERSION(3, 9, 0) && paintHandle() == handle) {
+ if (paintHandle() == handle) {
return gtk_draw(handle, arg0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
index 0de63b9c38..cf917d7797 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java
@@ -402,14 +402,7 @@ void createHandle (int index) {
}
void createIMMenu (long /*int*/ imHandle) {
- boolean showInputMethod = false;
- long /*int*/ settings = GTK.gtk_settings_get_default ();
- if (settings != 0 && GTK.GTK_VERSION < OS.VERSION (3, 10, 0)) {
- int [] buffer = new int [1];
- OS.g_object_get (settings, GTK.gtk_show_input_method_menu, buffer, 0);
- showInputMethod = buffer[0] != 0;
- }
- if (imHandle == 0 || !showInputMethod) {
+ if (imHandle == 0) {
this.imHandle = 0;
if (imItem != 0) {
GTK.gtk_widget_destroy (imItem);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
index 944f34c76e..c83f93e681 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java
@@ -264,14 +264,6 @@ void createHandle (int index) {
if (handle == 0) error (SWT.ERROR_NO_HANDLES);
break;
case SWT.RADIO:
- if (GTK.GTK_VERSION <= OS.VERSION (3, 10, 8)) {
- /*
- * Bug in Ubuntu <= 14.04 with UBUNTU_MENUPROXY. GTK crashes when
- * label of radio button is empty, see https://bugs.eclipse.org/419729 .
- * The workaround is to initialize the label with a space.
- */
- buffer = new byte [] { ' ', 0 };
- }
/*
* Feature in GTK. In GTK, radio button must always be part of
* a radio button group. In a GTK radio group, one button is always
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index efeffd6470..52430a46d9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -1087,11 +1087,7 @@ public int getAlpha () {
long /*int*/ screen = GTK.gtk_widget_get_screen(shellHandle);
boolean composited = GDK.gdk_screen_is_composited(screen);
if (composited) {
- /*
- * Feature in GTK: gtk_window_get_opacity() is deprecated on GTK3.8
- * onward. Use gtk_widget_get_opacity() instead.
- */
- return (int) (GTK.GTK_VERSION > OS.VERSION (3, 8, 0) ? GTK.gtk_widget_get_opacity(shellHandle) * 255 : GTK.gtk_window_get_opacity (shellHandle) * 255);
+ return (int) (GTK.gtk_widget_get_opacity(shellHandle) * 255);
}
return 255;
}
@@ -1939,16 +1935,7 @@ public void setAlpha (int alpha) {
long /*int*/ screen = GTK.gtk_widget_get_screen(shellHandle);
boolean composited = GDK.gdk_screen_is_composited(screen);
if (composited) {
- /*
- * Feature in GTK: gtk_window_set_opacity() is deprecated on GTK3.8
- * onward. Use gtk_widget_set_opacity() instead.
- */
- if (GTK.GTK_VERSION > OS.VERSION (3, 8, 0)) {
- GTK.gtk_widget_set_opacity (shellHandle, (double) alpha / 255);
- } else {
- alpha &= 0xFF;
- GTK.gtk_window_set_opacity (shellHandle, alpha / 255f);
- }
+ GTK.gtk_widget_set_opacity (shellHandle, (double) alpha / 255);
}
}
@@ -2284,7 +2271,7 @@ public void setMinimized (boolean minimized) {
checkWidget();
if (this.minimized == minimized) return;
super.setMinimized (minimized);
- if(GTK.GTK_VERSION >= OS.VERSION (3, 8, 0) && !GTK.gtk_widget_get_visible(shellHandle)) {
+ if(!GTK.gtk_widget_get_visible(shellHandle)) {
GTK.gtk_widget_show(shellHandle);
}
if (minimized) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index abe91217a6..f6699f3322 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -1471,7 +1471,7 @@ int getHeaderHeightInPixels () {
for (int i=0; i<columnCount; i++) {
long /*int*/ buttonHandle = columns [i].buttonHandle;
if (buttonHandle != 0) {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 8, 0) && !GTK.gtk_widget_get_visible(buttonHandle)) {
+ if (!GTK.gtk_widget_get_visible(buttonHandle)) {
GTK.gtk_widget_show(buttonHandle);
gtk_widget_get_preferred_size (buttonHandle, requisition);
GTK.gtk_widget_hide(buttonHandle);
@@ -2858,7 +2858,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
GTK.gtk_tree_path_free (path);
// A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117
- if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
+ if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
GdkRectangle r2 = new GdkRectangle ();
GDK.gdk_cairo_get_clip_rectangle (cr, r2);
rect.x = r2.x;
@@ -2905,7 +2905,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
}
gc.setFont (item.getFont (columnIndex));
if ((style & SWT.MIRRORED) != 0) rect.x = getClientWidth () - rect.width - rect.x;
- if (GTK.GTK_VERSION >= OS.VERSION(3, 9, 0) && cr != 0) {
+ if (cr != 0) {
GdkRectangle r = new GdkRectangle();
GDK.gdk_cairo_get_clip_rectangle(cr, r);
Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, r.y, r.width, r.height));
@@ -2979,7 +2979,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
GTK.gtk_tree_path_free (path);
// A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117
- if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
+ if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
GdkRectangle r2 = new GdkRectangle ();
GDK.gdk_cairo_get_clip_rectangle (cr, r2);
rect.x = r2.x;
@@ -3001,9 +3001,9 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
}
imageWidth = bounds.width;
}
- // On gtk >3.9 and <3.14.8 the clip rectangle does not have image area into clip rectangle
+ // On gtk < 3.14.8 the clip rectangle does not have image area into clip rectangle
// need to adjust clip rectangle with image width
- if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
+ if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
rect.x -= imageWidth;
rect.width +=imageWidth;
}
@@ -3600,10 +3600,8 @@ void setParentGdkWindow (Control child) {
* Table's fixedHandle to the draw signal, and propagate the draw
* signal using gtk_container_propagate_draw(). See bug 531928.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0)) {
- hasChildren = true;
- connectFixedHandleDraw();
- }
+ hasChildren = true;
+ connectFixedHandleDraw();
}
@Override
@@ -4016,7 +4014,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
* If this Table has any child widgets, propagate the draw signal
* to them using gtk_container_propagate_draw(). See bug 531928.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0) && hasChildren) {
+ if (hasChildren) {
propagateDraw(handle, arg0);
}
break;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
index 0e80db6dfd..5b325836fc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java
@@ -583,9 +583,7 @@ long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) {
void hookEvents () {
if ((style & SWT.BALLOON) != 0) {
OS.g_signal_connect_closure_by_id (handle, display.signalIds [EXPOSE_EVENT], 0, display.getClosure (EXPOSE_EVENT), true);
- if (GTK.GTK_VERSION >= OS.VERSION (3, 9, 0)) {
- OS.g_signal_connect_closure_by_id (handle, display.signalIds [EXPOSE_EVENT_INVERSE], 0, display.getClosure (EXPOSE_EVENT_INVERSE), true);
- }
+ OS.g_signal_connect_closure_by_id (handle, display.signalIds [EXPOSE_EVENT_INVERSE], 0, display.getClosure (EXPOSE_EVENT_INVERSE), true);
GTK.gtk_widget_add_events (handle, GDK.GDK_BUTTON_PRESS_MASK);
OS.g_signal_connect_closure (handle, OS.button_press_event, display.getClosure (BUTTON_PRESS_EVENT), false);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index ec84a7ccef..e4693db1ea 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -3049,7 +3049,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
GTK.gtk_tree_view_get_background_area (handle, path, columnHandle, rect);
GTK.gtk_tree_path_free (path);
// Use the x and width information from the Cairo context. See bug 535124 and 465309.
- if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
+ if (cr != 0 && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) {
GdkRectangle r2 = new GdkRectangle ();
GDK.gdk_cairo_get_clip_rectangle (cr, r2);
rect.x = r2.x;
@@ -3624,10 +3624,8 @@ void setParentGdkWindow (Control child) {
* Tree's fixedHandle to the draw signal, and propagate the draw
* signal using gtk_container_propagate_draw(). See bug 531928.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0)) {
- hasChildren = true;
- connectFixedHandleDraw();
- }
+ hasChildren = true;
+ connectFixedHandleDraw();
}
void setScrollWidth (long /*int*/ column, TreeItem item) {
@@ -3964,7 +3962,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
* If this Tree has any child widgets, propagate the draw signal
* to them using gtk_container_propagate_draw(). See bug 531928.
*/
- if (GTK.GTK_VERSION >= OS.VERSION(3, 10, 0) && hasChildren) {
+ if (hasChildren) {
propagateDraw(handle, arg0);
}
break;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index 98b89e97f6..f9d175f67a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -1938,7 +1938,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ user_data) {
long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) {
switch ((int)/*64*/user_data) {
case EXPOSE_EVENT_INVERSE: {
- if (GTK.GTK_VERSION >= OS.VERSION (3, 9, 0) && GTK.GTK_IS_CONTAINER (handle)) {
+ if (GTK.GTK_IS_CONTAINER (handle)) {
return gtk_draw (handle, arg0);
}
return 0;
@@ -1957,7 +1957,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
case EVENT: return gtk_event (handle, arg0);
case EVENT_AFTER: return gtk_event_after (handle, arg0);
case EXPOSE_EVENT: {
- if (GTK.GTK_VERSION < OS.VERSION (3, 9, 0) || !GTK.GTK_IS_CONTAINER (handle)) {
+ if (!GTK.GTK_IS_CONTAINER (handle)) {
return gtk_draw (handle, arg0);
}
return 0;

Back to the top