[java-atk-wrapper] Fix debug message
- From: Magdalen Berns <mberns src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper] Fix debug message
- Date: Sun, 18 Jan 2015 14:10:25 +0000 (UTC)
commit 48a30080dea094cadaa6355d7fe8de704a17699e
Author: Magdalen Berns <m berns thismagpie com>
Date: Sun Jan 18 14:09:51 2015 +0000
Fix debug message
https://bugzilla.gnome.org/show_bug.cgi?id=743125
jni/src/AtkWrapper.c | 29 ++++++++---------------------
1 files changed, 8 insertions(+), 21 deletions(-)
---
diff --git a/jni/src/AtkWrapper.c b/jni/src/AtkWrapper.c
index 5b18f9c..39b7c66 100644
--- a/jni/src/AtkWrapper.c
+++ b/jni/src/AtkWrapper.c
@@ -23,6 +23,7 @@
#include <glib.h>
#include <atk-bridge.h>
#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
#include <X11/Xlib.h>
#include <gconf/gconf-client.h>
#include "jawutil.h"
@@ -66,28 +67,17 @@ GCond *key_dispatch_cond;
static gint key_dispatch_result;
static gboolean (*origin_g_idle_dispatch) (GSource*, GSourceFunc, gpointer);
static GMainLoop* jni_main_loop;
-static int jaw_initialized = 0;
+static gboolean jaw_initialized;
gpointer current_bridge_data = NULL;
gboolean jaw_accessibility_init (void)
{
- if (jaw_debug)
- printf("2. Jaw Initialized %d\n", jaw_initialized);
+
atk_bridge_adaptor_init (NULL, NULL);
if (jaw_debug)
- g_print ("Atk Accessibility bridge initialized\n");
- if (g_getenv ("AT_SPI_DEBUG"))
- {
- if (jaw_debug)
- printf("3. Jaw Initialized %d\n", jaw_initialized );
- return TRUE;
- } else {
- if (jaw_debug)
- printf("3. Jaw NOT Initialized %d\n", jaw_initialized );
- return FALSE;
- }
- return FALSE;
+ printf("Atk Bridge Initialized\n");
+ return TRUE;
}
void
@@ -193,7 +183,7 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
jclass jClass)
{
// Enable ATK Bridge so we can load it now
- g_setenv("NO_AT_BRIDGE", "0", TRUE);
+ g_unsetenv ("NO_AT_BRIDGE");
g_assert (atk_bridge_mutex == NULL);
atk_bridge_mutex = g_new(GMutex, 1);
g_mutex_init(atk_bridge_mutex);
@@ -202,18 +192,15 @@ JNICALL Java_org_GNOME_Accessibility_AtkWrapper_loadAtkBridge(JNIEnv *jniEnv,
atk_bridge_cond = g_new(GCond, 1);
g_cond_init(atk_bridge_cond);
- if (jaw_debug)
- printf("1. Jaw Initialized = %d\n", jaw_initialized);
-
GThread *thread;
GError *err;
char * message;
message = "JNI main loop";
err = NULL;
- jaw_accessibility_init();
+ jaw_initialized = jaw_accessibility_init();
if (jaw_debug)
- printf("4. Jaw Initialized = %d\n", jaw_initialized);
+ printf("Jaw Initialization STATUS in loadAtkBridge: %d\n", jaw_initialized);
g_mutex_lock(atk_bridge_mutex);
jni_main_loop = g_main_loop_new (NULL, FALSE); /*main loop NOT running*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]