Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2018-08-13 20:17:09 +0000
committerEric Williams2018-08-13 20:32:04 +0000
commit6313a1324d08c937a5e55e77cbc91d1ade6d43c7 (patch)
tree41df425500d9a312cde743d4cd73fa4d2457cd29
parent26b042e525d770ec2bb9884d4d12f3a6e98d6210 (diff)
downloadeclipse.platform.swt-6313a1324d08c937a5e55e77cbc91d1ade6d43c7.tar.gz
eclipse.platform.swt-6313a1324d08c937a5e55e77cbc91d1ade6d43c7.tar.xz
eclipse.platform.swt-6313a1324d08c937a5e55e77cbc91d1ade6d43c7.zip
Bug 537908: [GTK3] Warning about invalid signal for
GtkTextViewAccessible "attributes-changed" Only send "attributes-changed" signal on GTK2 instances of GtkTextViewAccessible. Change-Id: I47d79fa68ee8c0046f9ad436371c19f0bc112859 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java2
6 files changed, 21 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
index 5e7ce5ff99..f9cea43919 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java
@@ -4870,6 +4870,10 @@ class AccessibleObject {
OS.g_object_notify(atkHandle, ATK.accessible_hypertext_nlinks);
break;
case ACC.EVENT_ATTRIBUTE_CHANGED:
+ if (GTK.GTK3) {
+ long /*int*/ gType = OS.G_OBJECT_TYPE(atkHandle);
+ if (gType == GTK.GTK_TYPE_TEXT_VIEW_ACCESSIBLE()) break;
+ }
OS.g_signal_emit_by_name (atkHandle, ATK.attributes_changed);
break;
case ACC.EVENT_TABLE_CAPTION_CHANGED:
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 7a4c8b4173..08e24009d6 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
@@ -3886,6 +3886,18 @@ JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1TYPE_1ACCESSIBLE)
}
#endif
+#ifndef NO_GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE
+JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE)
+ (JNIEnv *env, jclass that)
+{
+ jintLong rc = 0;
+ GTK_NATIVE_ENTER(env, that, GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC);
+ rc = (jintLong)GTK_TYPE_TEXT_VIEW_ACCESSIBLE;
+ GTK_NATIVE_EXIT(env, that, GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_GTK_1WIDGET_1GET_1CLASS
JNIEXPORT jintLong JNICALL GTK_NATIVE(GTK_1WIDGET_1GET_1CLASS)
(JNIEnv *env, jclass that, jintLong arg0)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
index 2da3e23995..78230105d0 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h
@@ -234,6 +234,7 @@ X#define NO__1XWarpPointer
#define NO_SwtFixedAccessible
#define NO__1swt_1fixed_1accessible_1get_1type
#define NO__1swt_1fixed_1accessible_1register_1accessible
+#define NO_GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE
#define NO_GdkRGBA
#define NO__1GDK_1TYPE_1RGBA
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 2e3901d11a..d5e53977d1 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
@@ -289,6 +289,7 @@ char * GTK_nativeFunctionNames[] = {
"GTK_1ENTRY_1IM_1CONTEXT",
"GTK_1TEXTVIEW_1IM_1CONTEXT",
"GTK_1TYPE_1ACCESSIBLE",
+ "GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE",
"GTK_1WIDGET_1GET_1CLASS",
"GTK_1WIDGET_1REQUISITION_1HEIGHT",
"GTK_1WIDGET_1REQUISITION_1WIDTH",
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 21df733edb..fd55aea6d2 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
@@ -287,6 +287,7 @@ typedef enum {
GTK_1ENTRY_1IM_1CONTEXT_FUNC,
GTK_1TEXTVIEW_1IM_1CONTEXT_FUNC,
GTK_1TYPE_1ACCESSIBLE_FUNC,
+ GTK_1TYPE_1TEXT_1VIEW_1ACCESSIBLE_FUNC,
GTK_1WIDGET_1GET_1CLASS_FUNC,
GTK_1WIDGET_1REQUISITION_1HEIGHT_FUNC,
GTK_1WIDGET_1REQUISITION_1WIDTH_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 03543415b0..f7bd6602bb 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
@@ -279,6 +279,8 @@ public class GTK extends OS {
public static final native int GTK_WIDGET_REQUISITION_HEIGHT(long /*int*/ widget);
/** @method flags=const */
public static final native long /*int*/ GTK_TYPE_ACCESSIBLE ();
+ /** @method flags=const */
+ public static final native long /*int*/ GTK_TYPE_TEXT_VIEW_ACCESSIBLE ();
public static final native long /*int*/ _GTK_ACCESSIBLE (long /*int*/ handle);
public static final native boolean _GTK_IS_ACCEL_LABEL(long /*int*/ obj);
public static final boolean GTK_IS_ACCEL_LABEL(long /*int*/ obj) {

Back to the top