[orca/gnome-3-14] Add support for XDG_VTNR for braille
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-3-14] Add support for XDG_VTNR for braille
- Date: Tue, 17 Feb 2015 23:41:59 +0000 (UTC)
commit 75d8281e46144e3a80dd2ea8fa8e9e5b7803d89d
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date: Tue Feb 17 18:38:12 2015 -0500
Add support for XDG_VTNR for braille
https://bugzilla.gnome.org/show_bug.cgi?id=744145
src/orca/braille.py | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/src/orca/braille.py b/src/orca/braille.py
index 5c92ccd..f3db24a 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -1719,11 +1719,20 @@ def init(callback=None, tty=7):
"Braille module has been initialized using WINDOWPATH=" \
+ "%s" % windowPath)
except:
- _brlAPI.enterTtyMode(tty)
- _brlAPIRunning = True
- debug.println(\
- debug.LEVEL_CONFIGURATION,
- "Braille module has been initialized using tty=%d" % tty)
+ try:
+ vtnr = os.environ["XDG_VTNR"]
+ _brlAPI.enterTtyModeWithPath()
+ _brlAPIRunning = True
+ debug.println(
+ debug.LEVEL_CONFIGURATION,
+ "Braille module has been initialized using XDG_VTNR=" \
+ + "%s" % vtnr)
+ except:
+ _brlAPI.enterTtyMode(tty)
+ _brlAPIRunning = True
+ debug.println(
+ debug.LEVEL_CONFIGURATION,
+ "Braille module has been initialized using tty=%d" % tty)
_brlAPISourceId = GLib.io_add_watch(_brlAPI.fileDescriptor,
GLib.PRIORITY_DEFAULT,
GLib.IO_IN,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]