[java-atk-wrapper] Directly initialise accessibility
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] Directly initialise accessibility
- Date: Mon, 5 Jan 2015 17:44:56 +0000 (UTC)
commit 1f778882de6572b5e91e37947cabc5a716bbd343
Author: Magdalen Berns <m berns thismagpie com>
Date: Mon Jan 5 17:36:55 2015 +0000
Directly initialise accessibility
Accessibility was being module loaded but for compatibility with
gtk 3.0 applications it is better to initialise accessibility
directly from the library
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=737125
configure.ac | 4 +---
jni/src/AtkWrapper.c | 42 +++---------------------------------------
jni/src/Makefile.am | 6 ++----
3 files changed, 6 insertions(+), 46 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0aa950e..ceebbed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,14 +44,12 @@ PKG_CHECK_MODULES(JAW, [
gthread-2.0
gmodule-2.0 >= 2.0.0
gdk-2.0
+ gdk-3.0
gconf-2.0
gobject-2.0
])
AC_SUBST(JAW_LIBS)
-GTK_MODULE_LIB_PATH="`pkg-config --variable=libdir gtk+-2.0`/gtk-2.0"
-AC_SUBST(GTK_MODULE_LIB_PATH)
-
case "${target_os}" in
cygwin*)
LIB_ATK_WRAPPER_LD_FLAGS="-avoid-version -no-undefined"
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index d0cc8f8..f685d18 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -113,23 +113,13 @@ static gboolean
jaw_load_atk_bridge (gpointer p)
{
g_mutex_lock(atk_bridge_mutex);
+ atk_bridge_adaptor_init (NULL, NULL);
- GVoidFunc dl_init;
- if (!g_module_symbol(module_atk_bridge,
- "gnome_accessibility_module_init",
- (gpointer*)&dl_init))
- {
- g_module_close(module_atk_bridge);
- return FALSE;
- }
+ if (jaw_debug)
+ printf("ATK Bridge has been loaded successfully\n");
- (dl_init)();
atexit( jaw_exit_func );
- if (jaw_debug) {
- printf("ATK Bridge has been loaded successfully\n");
- }
-
g_cond_signal(atk_bridge_cond);
g_mutex_unlock(atk_bridge_mutex);
@@ -173,31 +163,6 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_initNativeLibrary(JNIEnv *jniEnv
return JNI_FALSE;
}
- if (!g_module_supported())
- return JNI_FALSE;
-
- const gchar* gtk_module_path = g_getenv("GTK_PATH");
- if (!gtk_module_path)
- {
- gtk_module_path = GTK_MODULE_LIB_PATH;
- }
-
- if (jaw_debug) {
- printf("GTK_PATH=%s\n", gtk_module_path);
- }
-
- gtk_module_path = g_strconcat(gtk_module_path, "/modules", NULL);
- const gchar* atk_bridge_file = g_module_build_path(gtk_module_path, "atk-bridge");
-
- if (jaw_debug) {
- printf("We are going to load %s\n", atk_bridge_file);
- }
-
- module_atk_bridge = g_module_open(atk_bridge_file, G_MODULE_BIND_LAZY);
-
- if (!module_atk_bridge) {
- return JNI_FALSE;
- }
jaw_impl_init_mutex();
atk_bridge_mutex = g_new(GMutex, 1);
@@ -227,7 +192,6 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
g_setenv("NO_AT_BRIDGE", "0", TRUE);
const gchar *name = "loaded-bridge";
-
GMainLoop *main_loop = g_main_loop_new( NULL, FALSE );
g_idle_add(jaw_load_atk_bridge, NULL);
diff --git a/jni/src/Makefile.am b/jni/src/Makefile.am
index cd3d147..b1bd59c 100644
--- a/jni/src/Makefile.am
+++ b/jni/src/Makefile.am
@@ -23,12 +23,10 @@ noinst_HEADERS = jawimpl.h \
jawutil.h
libatk_wrapper_la_CFLAGS = $(JNI_INCLUDES)\
- $(JAW_CFLAGS) \
- -DGTK_MODULE_LIB_PATH=\"$(GTK_MODULE_LIB_PATH)\"
+ $(JAW_CFLAGS)
libatk_wrapper_la_CPPFLAGS = $(JNI_INCLUDES)\
- $(JAW_CFLAGS) \
- -DGTK_MODULE_LIB_PATH=\"$(GTK_MODULE_LIB_PATH)\"
+ $(JAW_CFLAGS)
libatk_wrapper_la_LDFLAGS = $(LIB_ATK_WRAPPER_LD_FLAGS) \
$(LT_VERSION_INFO) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]