[java-atk-wrapper/gnome-2-30] Use AT_SPI_IOR and AT_SPI_BUS instead of GConf key to check enablement of accessibility
- From: Ke Wang <kewang src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [java-atk-wrapper/gnome-2-30] Use AT_SPI_IOR and AT_SPI_BUS instead of GConf key to check enablement of accessibility
- Date: Fri, 15 Oct 2010 09:23:25 +0000 (UTC)
commit 0fe01a2848e26d615b6970d3ee790854d8122f26
Author: wangke <wangke goalie Prc Sun COM>
Date: Fri Oct 15 17:22:34 2010 +0000
Use AT_SPI_IOR and AT_SPI_BUS instead of GConf key to check enablement of accessibility
wrapper/org/GNOME/Accessibility/AtkWrapper.java.in | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
index e02fbac..e1e2baa 100644
--- a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
+++ b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
@@ -32,11 +32,17 @@ public class AtkWrapper {
Process p = Runtime.getRuntime().exec ("gconftool-2 -g /desktop/gnome/interface/accessibility");
BufferedReader b = new BufferedReader (
new InputStreamReader (p.getInputStream ()));
- String result = b.readLine();
- if (result != null && result.equals ("true")) {
- System.loadLibrary("atk-wrapper");
- if ( AtkWrapper.initNativeLibrary() ) {
- accessibilityEnabled = true;
+
+ String result;
+ while ((result = b.readLine()) != null) {
+ if (result.indexOf("AT_SPI_IOR") >= 0 ||
+ result.indexOf("AT_SPI_BUS") >= 0) {
+ System.loadLibrary("atk-wrapper");
+ if (AtkWrapper.initNativeLibrary()) {
+ accessibilityEnabled = true;
+ }
+
+ break;
}
}
} catch (Exception e) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]