summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov <akurtako@redhat.com>2013-07-10 16:17:03 +0300
committerAlexander Kurtakov <akurtako@redhat.com>2013-07-10 16:17:03 +0300
commitca5e588017b8795b03417457562b8f46567bc04f (patch)
treee54d5d638d93efcd78aa5b50de728415976b5248
parent95087f70461c9fdee64c3c9d1fda2ec4d269324c (diff)
downloadeclipse.platform.swt-ca5e588017b8795b03417457562b8f46567bc04f.tar.gz
eclipse.platform.swt-ca5e588017b8795b03417457562b8f46567bc04f.tar.xz
eclipse.platform.swt-ca5e588017b8795b03417457562b8f46567bc04f.zip
gtk_scrolled_window_add_with_viewport is deprecated in GTK 3.8.
Use gtk_container_add for GTK 3.8 or newer.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java6
4 files changed, 15 insertions, 1 deletions
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 9905801d97..d363181c0d 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
@@ -14369,7 +14369,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1scrolled_1window_1add_1with_1viewport)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
{
OS_NATIVE_ENTER(env, that, _1gtk_1scrolled_1window_1add_1with_1viewport_FUNC);
+/*
gtk_scrolled_window_add_with_viewport((GtkScrolledWindow *)arg0, (GtkWidget *)arg1);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_scrolled_window_add_with_viewport)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkScrolledWindow *, GtkWidget *))fp)((GtkScrolledWindow *)arg0, (GtkWidget *)arg1);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1scrolled_1window_1add_1with_1viewport_FUNC);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
index e01da94898..2c429ffe93 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h
@@ -290,6 +290,7 @@
#define gtk_style_render_icon_LIB LIB_GTK
#define gtk_hscale_new_LIB LIB_GTK
#define gtk_vscale_new_LIB LIB_GTK
+#define gtk_scrolled_window_add_with_viewport_LIB LIB_GTK
#define gtk_selection_data_get_data_LIB LIB_GTK
#define gtk_selection_data_get_data_type_LIB LIB_GTK
#define gtk_selection_data_get_format_LIB LIB_GTK
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
index c5cba55a2d..5b6aa53829 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java
@@ -10406,6 +10406,7 @@ public static final void gtk_rc_style_set_text(long /*int*/ style, int index, Gd
}
}
/**
+ * @method flags=dynamic
* @param scrolled_window cast=(GtkScrolledWindow *)
* @param child cast=(GtkWidget *)
*/
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 c13e0a31a0..6773fad7b8 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
@@ -137,7 +137,11 @@ void createHandle (int index) {
if (scrolledHandle == 0) error (SWT.ERROR_NO_HANDLES);
OS.gtk_scrolled_window_set_policy (scrolledHandle, OS.GTK_POLICY_NEVER, OS.GTK_POLICY_AUTOMATIC);
OS.gtk_container_add (fixedHandle, scrolledHandle);
- OS.gtk_scrolled_window_add_with_viewport (scrolledHandle, handle);
+ if (OS.VERSION(3, 8, 0)<OS.GTK_VERSION) {
+ OS.gtk_scrolled_window_add_with_viewport (scrolledHandle, handle);
+ } else {
+ OS.gtk_container_add(scrolledHandle, handle);
+ }
long /*int*/ viewport = OS.gtk_bin_get_child (scrolledHandle);
OS.gtk_viewport_set_shadow_type (viewport, OS.GTK_SHADOW_NONE);
} else {