summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorAlexander Kurtakov <akurtako@redhat.com>2011-12-13 23:30:44 +0200
committerSilenio Quarti <silenio_quarti@ca.ibm.com>2012-01-20 11:43:50 -0500
commit78500020090976af077471b3e341f6d07a0b37f2 (patch)
tree65a18585a466d555d272034a82990a2ab6ea5da3 /bundles
parent75c274e4fa1923159023dd9bdcdf3ac07cf46332 (diff)
downloadeclipse.platform.swt-78500020090976af077471b3e341f6d07a0b37f2.tar.gz
eclipse.platform.swt-78500020090976af077471b3e341f6d07a0b37f2.tar.xz
eclipse.platform.swt-78500020090976af077471b3e341f6d07a0b37f2.zip
Make gtk_tooltips_enable/disable dynamic.
Both calls were guarded by if tooltipsHandle !=0 and tooltiopsHandle is created only for gtk versions lower than 2.12 that's why the guard has been expanded to be (tooltipsHandle != 0 && GTK_vrsion < 2.12).
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c20
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java8
4 files changed, 28 insertions, 6 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 233faf220e..67e408f3a6 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
@@ -14318,7 +14318,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tooltips_1disable)
(JNIEnv *env, jclass that, jintLong arg0)
{
OS_NATIVE_ENTER(env, that, _1gtk_1tooltips_1disable_FUNC);
- gtk_tooltips_disable((GtkTooltips *)arg0);
+/*
+ gtk_tooltips_disable(arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_tooltips_disable)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1tooltips_1disable_FUNC);
}
#endif
@@ -14328,7 +14336,15 @@ JNIEXPORT void JNICALL OS_NATIVE(_1gtk_1tooltips_1enable)
(JNIEnv *env, jclass that, jintLong arg0)
{
OS_NATIVE_ENTER(env, that, _1gtk_1tooltips_1enable_FUNC);
- gtk_tooltips_enable((GtkTooltips *)arg0);
+/*
+ gtk_tooltips_enable(arg0);
+*/
+ {
+ OS_LOAD_FUNCTION(fp, gtk_tooltips_enable)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0);
+ }
+ }
OS_NATIVE_EXIT(env, that, _1gtk_1tooltips_1enable_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 9dbf3616bf..14598ac459 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
@@ -129,6 +129,8 @@
#define gtk_toolbar_set_orientation_LIB LIB_GTK
#define gtk_tooltip_trigger_tooltip_query_LIB LIB_GTK
#define gtk_tooltips_set_tip_LIB LIB_GTK
+#define gtk_tooltips_enable_LIB LIB_GTK
+#define gtk_tooltips_disable_LIB LIB_GTK
#define gtk_tooltips_force_window_LIB LIB_GTK
#define gtk_tree_selection_count_selected_rows_LIB LIB_GTK
#define gtk_tree_selection_get_selected_rows_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 40e509015c..5c80dce609 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
@@ -11180,7 +11180,7 @@ public static final int /*long*/ gtk_tooltips_data_get(int /*long*/ widget) {
lock.unlock();
}
}
-/** @param tooltips cast=(GtkTooltips *) */
+/** @method flags=dynamic */
public static final native void _gtk_tooltips_disable(int /*long*/ tooltips);
public static final void gtk_tooltips_disable(int /*long*/ tooltips) {
lock.lock();
@@ -11190,7 +11190,7 @@ public static final void gtk_tooltips_disable(int /*long*/ tooltips) {
lock.unlock();
}
}
-/** @param tooltips cast=(GtkTooltips *) */
+/** @method flags=dynamic */
public static final native void _gtk_tooltips_enable(int /*long*/ tooltips);
public static final void gtk_tooltips_enable(int /*long*/ tooltips) {
lock.lock();
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 f7ee4f287a..1ace883cd5 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
@@ -725,7 +725,9 @@ int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*
case OS.NotifyNonlinear:
case OS.NotifyNonlinearVirtual:
case OS.NotifyAncestor:
- if (tooltipsHandle != 0) OS.gtk_tooltips_enable (tooltipsHandle);
+ if (tooltipsHandle != 0 && OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+ OS.gtk_tooltips_enable (tooltipsHandle);
+ }
display.activeShell = this;
display.activePending = false;
sendEvent (SWT.Activate);
@@ -743,7 +745,9 @@ int /*long*/ filterProc (int /*long*/ xEvent, int /*long*/ gdkEvent, int /*long*
case OS.NotifyNonlinear:
case OS.NotifyNonlinearVirtual:
case OS.NotifyVirtual:
- if (tooltipsHandle != 0) OS.gtk_tooltips_disable (tooltipsHandle);
+ if (tooltipsHandle != 0 && OS.GTK_VERSION < OS.VERSION (2, 12, 0)) {
+ OS.gtk_tooltips_disable (tooltipsHandle);
+ }
Display display = this.display;
sendEvent (SWT.Deactivate);
setActiveControl (null);