[java-atk-wrapper] 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] Use AT_SPI_IOR and AT_SPI_BUS instead of GConf key to check enablement of accessibility
- Date: Fri, 15 Oct 2010 08:40:10 +0000 (UTC)
commit 0d30f009b97e5c4b5a8141bcde11dc98dd06f373
Author: wangke <wangke goalie Prc Sun COM>
Date: Fri Oct 15 16:39:14 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 | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
index e02fbac..e8c8483 100644
--- a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
+++ b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
@@ -29,14 +29,20 @@ public class AtkWrapper {
static boolean accessibilityEnabled = false;
static {
try {
- Process p = Runtime.getRuntime().exec ("gconftool-2 -g /desktop/gnome/interface/accessibility");
+ Process p = Runtime.getRuntime().exec ("@XPROP@ -root");
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]