NVDA with Japanese branch
Révision | c6616ae67c8eea328efad384dc2005905d6f8e1d (tree) |
---|---|
l'heure | 2015-01-30 21:41:58 |
Auteur | Takuya Nishimoto <nishimotz@gmai...> |
Commiter | Takuya Nishimoto |
Merge branch 'jpbeta' into ti34812
@@ -163,3 +163,4 @@ Dinesh Mittal | ||
163 | 163 | Maheshinder Singh Khosla |
164 | 164 | Zvonimir Stanecic |
165 | 165 | Tyler Spivey |
166 | +Siddhartha Gupta |
@@ -2,7 +2,7 @@ | ||
2 | 2 | #A part of NonVisual Desktop Access (NVDA) |
3 | 3 | #This file is covered by the GNU General Public License. |
4 | 4 | #See the file COPYING for more details. |
5 | -#Copyright (C) 2012 Tobias Platen, Halim Sahin, Ali-Riza Ciftcioglu, NV Access Limited | |
5 | +#Copyright (C) 2012-2015 Tobias Platen, Halim Sahin, Ali-Riza Ciftcioglu, NV Access Limited | |
6 | 6 | #Author: Tobias Platen (nvda@lists.thm.de) |
7 | 7 | #minor changes by Halim Sahin (nvda@lists.thm.de), Ali-Riza Ciftcioglu <aliminator83@googlemail.com> and James Teh |
8 | 8 |
@@ -104,7 +104,7 @@ def brl_poll(dev): | ||
104 | 104 | |
105 | 105 | def brl_decode_trio(keys): |
106 | 106 | """decode routing keys on Trio""" |
107 | - if(keys[0:3]=='KP_' ): #KEYSTATE CHANGED EVENT on Trio, not Braille keys | |
107 | + if(keys[0]=='K' ): #KEYSTATE CHANGED EVENT on Trio, not Braille keys | |
108 | 108 | keys = keys[3:] |
109 | 109 | i = 0 |
110 | 110 | j = [] |
@@ -227,12 +227,9 @@ class BrailleDisplayDriver(braille.BrailleDisplayDriver, ScriptableObject): | ||
227 | 227 | port = portInfo["port"] |
228 | 228 | hwID = portInfo["hardwareID"] |
229 | 229 | if "bluetoothName" in portInfo: |
230 | - if(portInfo["bluetoothName"] == "braillex trio "): | |
230 | + if portInfo["bluetoothName"][0:14] == "braillex trio " or portInfo["bluetoothName"][0:13] == "braillex live": | |
231 | 231 | try: |
232 | 232 | self._dev = serial.Serial(port, baudrate = 57600,timeout = BLUETOOTH_TIMEOUT, writeTimeout = BLUETOOTH_TIMEOUT) |
233 | - self.numCells = 40 | |
234 | - self._proto = 'B' | |
235 | - self._voffset = 0 | |
236 | 233 | log.info("connectBluetooth success") |
237 | 234 | except: |
238 | 235 | log.debugWarning("connectBluetooth failed") |
@@ -271,8 +268,7 @@ connection could not be established""" | ||
271 | 268 | elif ftdi2: |
272 | 269 | self._baud = 57600 |
273 | 270 | self.connectUSB(devlist) |
274 | - if(self._dev is None): | |
275 | - return None | |
271 | + if(self._dev is not None): | |
276 | 272 | try: |
277 | 273 | #request type of braille display |
278 | 274 | self._dev.write(brl_auto_id()) |
@@ -284,13 +280,14 @@ connection could not be established""" | ||
284 | 280 | self._dev.set_baud_rate(self._baud) |
285 | 281 | self._dev.purge() |
286 | 282 | self._dev.read(self._dev.inWaiting()) |
287 | - self.numCells = 40 | |
288 | - self._proto = 'B' | |
289 | - self._voffset = 0 | |
290 | - #we don't use autoid here, because the trio might be switched off and other braille displays using the same baud rate do not exist | |
283 | + #request type of braille display twice because of baudrate change | |
284 | + self._dev.write(brl_auto_id()) | |
285 | + self._dev.write(brl_auto_id()) | |
286 | + time.sleep(0.05)# wait 50 ms in order to get response for further actions | |
287 | + autoid=brl_poll(self._dev) | |
288 | + if(len(autoid) != 8): | |
289 | + return None | |
291 | 290 | else: |
292 | - if(len(autoid) != 8): | |
293 | - return None | |
294 | 291 | autoid = struct.unpack('BBBBBBBB',autoid) |
295 | 292 | if(autoid[3] == 0x35 and autoid[4] == 0x38):#EL80s |
296 | 293 | self.numCells = 80 |
@@ -355,6 +352,26 @@ connection could not be established""" | ||
355 | 352 | self._proto = 'A' |
356 | 353 | self._voffset = 20 |
357 | 354 | log.info("Found EL2D80s") |
355 | + elif(autoid[3] == 0x35 and autoid[4] == 0x39):#trio | |
356 | + self.numCells = 40 | |
357 | + self._proto = 'B' | |
358 | + self._voffset = 0 | |
359 | + log.info("Found trio") | |
360 | + elif(autoid[3] == 0x36 and autoid[4] == 0x34):#live20 | |
361 | + self.numCells = 20 | |
362 | + self._proto = 'B' | |
363 | + self._voffset = 0 | |
364 | + log.info("Found live 20") | |
365 | + elif(autoid[3] == 0x36 and autoid[4] == 0x33):#live+ | |
366 | + self.numCells = 40 | |
367 | + self._proto = 'B' | |
368 | + self._voffset = 0 | |
369 | + log.info("Found live+") | |
370 | + elif(autoid[3] == 0x36 and autoid[4] == 0x32):#live | |
371 | + self.numCells = 40 | |
372 | + self._proto = 'B' | |
373 | + self._voffset = 0 | |
374 | + log.info("Found live") | |
358 | 375 | else: |
359 | 376 | log.debugWarning('UNKNOWN BRAILLE') |
360 | 377 |
@@ -511,7 +528,7 @@ class InputGesture(braille.BrailleDisplayGesture, brailleInput.BrailleInputGestu | ||
511 | 528 | self.id=brl_join_keys(brl_decode_key_names_repeat(driver)) |
512 | 529 | return |
513 | 530 | |
514 | - if driver._baud!=1 and keys[0] == 'L': | |
531 | + if driver._baud != 1 and keys[0] == 'L' and not ((ord(keys[3])-48) >>3): | |
515 | 532 | #get dots |
516 | 533 | z = ord('0') |
517 | 534 | b = ord(keys[4])-z |
@@ -1,7 +1,7 @@ | ||
1 | 1 | # -*- coding: UTF-8 -*- |
2 | 2 | #core.py |
3 | 3 | #A part of NonVisual Desktop Access (NVDA) |
4 | -#Copyright (C) 2006-2014 NV Access Limited, Aleksey Sadovoy, Christopher Toth, Joseph Lee, Peter Vágner | |
4 | +#Copyright (C) 2006-2015 NV Access Limited, Aleksey Sadovoy, Christopher Toth, Joseph Lee, Peter Vágner | |
5 | 5 | #This file is covered by the GNU General Public License. |
6 | 6 | #See the file COPYING for more details. |
7 | 7 |
@@ -58,9 +58,6 @@ def doStartupDialogs(): | ||
58 | 58 | gui.messageBox(_("Your gesture map file contains errors.\n" |
59 | 59 | "More details about the errors can be found in the log file."), |
60 | 60 | _("gesture map File Error"), wx.OK|wx.ICON_EXCLAMATION) |
61 | - if not config.conf["upgrade"]["newLaptopKeyboardLayout"]: | |
62 | - from gui import upgradeAlerts | |
63 | - upgradeAlerts.NewLaptopKeyboardLayout.run() | |
64 | 61 | |
65 | 62 | def restart(disableAddons=False): |
66 | 63 | """Restarts NVDA by starting a new copy with -r.""" |
@@ -1,69 +0,0 @@ | ||
1 | -#upgradeAlerts.py | |
2 | -#A part of NonVisual Desktop Access (NVDA) | |
3 | -#Copyright (C) 2013 NV Access Limited | |
4 | -#This file is covered by the GNU General Public License. | |
5 | -#See the file COPYING for more details. | |
6 | - | |
7 | -"""Dialogs displayed when NVDA starts containing important information about changes to NVDA. | |
8 | -""" | |
9 | - | |
10 | -import os | |
11 | -import wx | |
12 | -import gui | |
13 | -import config | |
14 | - | |
15 | -class NewLaptopKeyboardLayout(wx.Dialog): | |
16 | - MESSAGE = _( | |
17 | - # Translators: Information about NVDA's new laptop keyboard layout. | |
18 | - "In NVDA 2013.1, the laptop keyboard layout has been completely redesigned in order to make it more intuitive and consistent.\n" | |
19 | - "If you use the laptop layout, please see the What's New document for more information." | |
20 | - ) | |
21 | - | |
22 | - def __init__(self, parent): | |
23 | - # Translators: The title of a dialog providing information about NVDA's new laptop keyboard layout. | |
24 | - super(NewLaptopKeyboardLayout, self).__init__(parent, title=_("New Laptop Keyboard layout")) | |
25 | - mainSizer = wx.BoxSizer(wx.VERTICAL) | |
26 | - item = wx.StaticText(self, label=self.MESSAGE) | |
27 | - mainSizer.Add(item, border=20, flag=wx.LEFT | wx.RIGHT | wx.TOP) | |
28 | - # Translators: The label of a button in the New Laptop Keyboard Layout dialog | |
29 | - # to open the What's New document. | |
30 | - whatsNewButton = wx.Button(self, label=_("Read What's New")) | |
31 | - whatsNewButton.Bind(wx.EVT_BUTTON, self.onWhatsNew) | |
32 | - mainSizer.Add(whatsNewButton) | |
33 | - | |
34 | - mainSizer.Add(self.CreateButtonSizer(wx.OK),flag=wx.TOP|wx.BOTTOM|wx.ALIGN_CENTER_HORIZONTAL,border=20) | |
35 | - self.Bind(wx.EVT_BUTTON, lambda evt: self.Close(), id=wx.ID_OK) | |
36 | - | |
37 | - self.Bind(wx.EVT_CLOSE, self.onClose) | |
38 | - | |
39 | - whatsNewButton.SetFocus() | |
40 | - self.Sizer = mainSizer | |
41 | - mainSizer.Fit(self) | |
42 | - self.Center(wx.BOTH | wx.CENTER_ON_SCREEN) | |
43 | - | |
44 | - def onClose(self, evt): | |
45 | - config.conf["upgrade"]["newLaptopKeyboardLayout"] = True | |
46 | - try: | |
47 | - config.conf.save() | |
48 | - except: | |
49 | - pass | |
50 | - self.EndModal(0) | |
51 | - | |
52 | - def onWhatsNew(self, evt): | |
53 | - #os.startfile(gui.getDocFilePath("changes.html")) | |
54 | - # nvdajp begin | |
55 | - from gui import openDocFileAsHTA | |
56 | - openDocFileAsHTA("changes") | |
57 | - # nvdajp end | |
58 | - self.Close() | |
59 | - | |
60 | - @classmethod | |
61 | - def run(cls): | |
62 | - """Prepare and display an instance of this dialog. | |
63 | - This does not require the dialog to be instantiated. | |
64 | - """ | |
65 | - gui.mainFrame.prePopup() | |
66 | - d = cls(gui.mainFrame) | |
67 | - d.ShowModal() | |
68 | - d.Destroy() | |
69 | - gui.mainFrame.postPopup() |
@@ -0,0 +1,43 @@ | ||
1 | +#Assamese characterDescriptions.dic | |
2 | +#A part of NonVisual Desktop Access (NVDA) | |
3 | +#URL: http://www.nvda-project.org/ | |
4 | +#This file is covered by the GNU General Public License. | |
5 | + | |
6 | +ক কল | |
7 | +খ খেতি | |
8 | +গ গছ | |
9 | +ঘ ঘর | |
10 | +ঙ | |
11 | +চ চকু | |
12 | +ছ ছবি | |
13 | +জ জগত | |
14 | +ঝ ঝৰণা | |
15 | + | |
16 | +ট টকা | |
17 | +ঠ ঠোঁট | |
18 | +ড ডিঙি | |
19 | +ঢ ঢোল | |
20 | +ণ | |
21 | +ত তুমি | |
22 | +থ থাল | |
23 | +দ দলঙ | |
24 | +ধ ধ্যান | |
25 | +ন নাক | |
26 | +প পানি | |
27 | +ফ ফূল | |
28 | +ব ভাতি | |
29 | +ভ ভাট | |
30 | +ম মাতি | |
31 | +য যুগ | |
32 | +ৰ ৰঙ | |
33 | +ল লেখক | |
34 | +ৱ | |
35 | +শ শব্দ | |
36 | +ষ ষাৰগৰূ | |
37 | +স সমান | |
38 | +হ হাতী | |
39 | +য় য়াক | |
40 | +ক্ষ ক্ষমা | |
41 | +ং | |
42 | +ৎ | |
43 | +ঁ |
@@ -0,0 +1,52 @@ | ||
1 | +#Bengali characterDescriptions.dic | |
2 | +#A part of NonVisual Desktop Access (NVDA) | |
3 | +#URL: http://www.nvda-project.org/ | |
4 | +#This file is covered by the GNU General Public License. | |
5 | + | |
6 | +অ অজগর | |
7 | +আ আম | |
8 | +ই ইঁদুর | |
9 | +ঈ ঈগল | |
10 | +এ এক্কা গাড়ী | |
11 | +ঐ ঐরাবত | |
12 | +ও ওল | |
13 | +ঔ ঔষধ | |
14 | +ঋ ঋষি | |
15 | +ক কলম | |
16 | +খ খড়ম | |
17 | +গ গরু | |
18 | +ঘ ঘর | |
19 | +ঙ | |
20 | +চ চড়াই | |
21 | +ছ ছাতা | |
22 | +জ জাল | |
23 | +ঝ ঝড় | |
24 | +ঞ | |
25 | +ট টুপি | |
26 | +ঠ ঠিকানা | |
27 | +ড ডালিম | |
28 | +ঢ ঢাকনা | |
29 | +ণ বাণ | |
30 | +ত তাল | |
31 | +থ থাম | |
32 | +দ দই | |
33 | +ধ ধরনী | |
34 | +ন নরুন | |
35 | +প পরী | |
36 | +ফ ফড়িং | |
37 | +ব বই | |
38 | +ভ ভাল্লুক | |
39 | +ম মশা | |
40 | +য় অন্ত্যস্থ য | |
41 | +য যাতনা | |
42 | +র রাত্রি | |
43 | +ড় ড য় শুন্য ড় | |
44 | +ঢ় ঢ য় শুন্য ঢ় | |
45 | +ল ললাট | |
46 | +শ শরীর | |
47 | +স সকাল | |
48 | +ষ ষন্ড | |
49 | +হ হলুদ | |
50 | +ং অনুস্বর | |
51 | +ঁ চন্দ্রবিন্দু | |
52 | +ঃ বিসর্গ |
@@ -0,0 +1,62 @@ | ||
1 | +#Gujarati characterDescriptions.dic | |
2 | +#A part of NonVisual Desktop Access (NVDA) | |
3 | +#URL: http://www.nvda-project.org/ | |
4 | +#This file is covered by the GNU General Public License. | |
5 | + | |
6 | +ક કલમ | |
7 | +ખ ખટારો | |
8 | +ગ ગાય | |
9 | +ઘ ઘડિયાળ | |
10 | +ચ ચકલી | |
11 | +છ છત્રી | |
12 | +જ જમરુખ | |
13 | +ઝ ઝાડ | |
14 | +ટ ટપાલ | |
15 | +ઠ ઠડિયો | |
16 | +ડ ડગલો | |
17 | +ઢ ઢગલો | |
18 | +ણ ફેણ મા ણ | |
19 | +ત તલવાર | |
20 | +થ થાળી | |
21 | +દ દડો | |
22 | +ધ ધજા | |
23 | +ન નગારું | |
24 | +પ પતંગ | |
25 | +ફ ફાનસ | |
26 | +બ બકરી | |
27 | +ભ ભમરડો | |
28 | +મ મરચું | |
29 | +ય યતીશ | |
30 | +ર રથ | |
31 | +લ લખોટા | |
32 | +વ વહાણ | |
33 | +શ શકોરું | |
34 | +ષ ષડ્કોણ | |
35 | +સ સસલું | |
36 | +હ હરણ | |
37 | +ળ નળ મા ળ | |
38 | +જ્ઞ જ્ઞાનેશ્વર | |
39 | + | |
40 | +અ અગ્નિ | |
41 | +આ આગગાડી | |
42 | +ઇ ઇમારત | |
43 | +ઈ ઈશાન | |
44 | +ઉ ઉશા | |
45 | +ઊ ઊંટ | |
46 | +એ એરણ | |
47 | +ઐ ઐરાવત | |
48 | +ઓ ઓશિકું | |
49 | +ઔ ઔષધી | |
50 | +ઋ ઋષિ | |
51 | +ઙ | |
52 | +ઞ | |
53 | +એ એરણ | |
54 | +ઐ ઐરાવત | |
55 | +ઑ | |
56 | +ઓ ઓશિકું | |
57 | +ઔ ઔષધી | |
58 | +અં | |
59 | +અઃ | |
60 | +અઁ | |
61 | + | |
62 | + |
@@ -0,0 +1,39 @@ | ||
1 | +#Konkani characterDescriptions.dic | |
2 | +#A part of NonVisual Desktop Access (NVDA) | |
3 | +#URL: http://www.nvda-project.org/ | |
4 | +#This file is covered by the GNU General Public License. | |
5 | + | |
6 | +क कमळ | |
7 | +ख खरें | |
8 | +ग गट | |
9 | +घ घर | |
10 | +च चलो | |
11 | +छ छत्तीस | |
12 | +ज जड | |
13 | +झ झर | |
14 | +ट टको | |
15 | +ठ ठक | |
16 | +ड डफ | |
17 | +ढ ढगाळ | |
18 | +ण णव्वद | |
19 | +त तसलें | |
20 | +थ थर | |
21 | +द दगदग | |
22 | +ध धग | |
23 | +न नवें | |
24 | +प पड | |
25 | +फ फट | |
26 | +ब बरें | |
27 | +भ भलें | |
28 | +म मन | |
29 | +य यमन | |
30 | +र रण | |
31 | +ल लगोरी | |
32 | +व वट | |
33 | +श शतक | |
34 | +स समान | |
35 | +ह हती | |
36 | +क्ष क्षपण | |
37 | +ज्ञ ज्ञान | |
38 | + | |
39 | + |
@@ -0,0 +1,70 @@ | ||
1 | +#Malayalam characterDescriptions.dic | |
2 | +#A part of NonVisual Desktop Access (NVDA) | |
3 | +#URL: http://www.nvda-project.org/ | |
4 | +#This file is covered by the GNU General Public License. | |
5 | + | |
6 | +അ അധ്യാപകന് | |
7 | +ആ ആകാശം | |
8 | +ഇ ഇഞ്ചി | |
9 | +ഈ ഈശ്വരന് | |
10 | +ഉ ഉത്തരം | |
11 | +ഊ ഊഞ്ഞാല് | |
12 | +ഋ ഋഗ്വേദം | |
13 | +എ എട്ടുകാലി | |
14 | +ഏ ഏകത | |
15 | +ഐ ഐതിഹ്യം | |
16 | +ഒ ഒത്തുതീര്പ്പ് | |
17 | +ഓ ഓണം | |
18 | +ഔ ഔഷധം | |
19 | +ക കടല് | |
20 | +ഖ ഖജനാവ് | |
21 | +ഗ ഗണിതം | |
22 | +ഘ ഘടികാരം | |
23 | +ങ | |
24 | +ച ചക്രവര്ത്തി | |
25 | +ഛ ഛായാഗ്രഹണം | |
26 | +ജ ജനകീയഭരണം | |
27 | +ഝ ഝട | |
28 | +ഞ ഞങ്ങള് | |
29 | +ട ടട്ടനി | |
30 | +ഠ ഠക്കുരം | |
31 | +ഡ ഡാംഭികന് | |
32 | +ഢ ഢങ്കിക | |
33 | +ണ | |
34 | +ത തക്കാളി | |
35 | +ഥ ഥര്വണം | |
36 | +ദ ദയ | |
37 | +ധ ധനം | |
38 | +ന നക്ഷത്രം | |
39 | +പ പുസ്തകം | |
40 | +ഫ ഫലം | |
41 | +ബ ബന്ധുത്വം | |
42 | +ഭ ഭയം | |
43 | +മ മരുഭുമി | |
44 | +യ യജ്ഞം | |
45 | +ര രാജ്യം | |
46 | +ല ലയനം | |
47 | +വ വായനശാല | |
48 | +ശ ശനി | |
49 | +ഷ ഷഡ്ഭുജം | |
50 | +സ സംഗീതം | |
51 | +ഹ ഹംസം | |
52 | +ള | |
53 | +ഴ | |
54 | +റ റാണി | |
55 | +് ചന്ദ്രക്കല | |
56 | +ി ചെറിയ ഇ യുഡെ ദീറ്കം | |
57 | +ു ചെറിയ ഉ യുഡെ ദീറ്കം | |
58 | +െ ചെറിയ എ യുഡെ ദീറ്കം | |
59 | +ൊ ചെറിയ ഒ യുഡെ ദീറ്കം | |
60 | +ാ വലിയ ആ യുഡെ ദീറ്കം | |
61 | +ീ വലിയ ഈ യുഡെ ദീറ്കം | |
62 | +ൂ വലിയ ഊ യുഡെ ദീറ്കം | |
63 | +േ വലിയ ഏ യുഡെ ദീറ്കം | |
64 | +ോ വലിയ ഓ യുഡെ ദീറ്കം | |
65 | +ൈ ഐ യുഡെ ദീറ്കം | |
66 | +ൌ ഔ യുഡെ ദീറ്കം | |
67 | +ം അമ്ബുജം | |
68 | +ൃ ഋ യുഡെ ദീറ്കം | |
69 | + | |
70 | + |
@@ -0,0 +1,54 @@ | ||
1 | +অ অঙাং | |
2 | +আ আলু | |
3 | +ই ইরোই | |
4 | +ঈ ঈল | |
5 | +উ উপাল | |
6 | +ঊ ঊচি | |
7 | +ঋ ঋশি | |
8 | +এ কাগগাডী | |
9 | +ঐ ঐ | |
10 | +ও ওঝা | |
11 | +ঔ ঔ | |
12 | +অং অং Lর | |
13 | +অঃ অঃ | |
14 | +ক কৈ | |
15 | +খ খজিং | |
16 | +গ গমলা | |
17 | +ঘ ঘড়ী | |
18 | +ঙ ঙা | |
19 | +চ চফূ | |
20 | +ছ ছাটিন | |
21 | +জ জীপ | |
22 | +ঝ ঝাল | |
23 | +ঞ ঞ | |
24 | +ট টূপী | |
25 | +ঠ ঠেলাগাড়ী | |
26 | +ড ডম্বূব় | |
27 | +ঢ ঢোল | |
28 | +ন ন | |
29 | +ত তেব়ং | |
30 | +থ থম্বাল | |
31 | +দ দলাল | |
32 | +ধ ধুলোক | |
33 | +ন নোংমৈ | |
34 | +প পুং | |
35 | +ফ পমুং | |
36 | +ব বালতিন | |
37 | +ভ ভারত | |
38 | +ম মকু | |
39 | +য যম | |
40 | +র রেলগাড়ী | |
41 | +ল লফোয় | |
42 | +w wuইনু | |
43 | +শ শীংজং | |
44 | +ষ ষন | |
45 | +স সনাবুল | |
46 | +হ হৌদোং | |
47 | +য় য়েন | |
48 | +q q | |
49 | +ড় ড় | |
50 | +ঢ় ঢ় | |
51 | +ং ং | |
52 | +ঃ ঃ | |
53 | +ঁ ঁ | |
54 | +D D |
@@ -0,0 +1,72 @@ | ||
1 | +#Telugu characterDescriptions.dic | |
2 | +#A part of NonVisual Desktop Access (NVDA) | |
3 | +#URL: http://www.nvda-project.org/ | |
4 | +#This file is covered by the GNU General Public License. | |
5 | + | |
6 | +అ అమ్మ | |
7 | +ఆ ఆవు | |
8 | +ఇ ఇల్లు | |
9 | +ఈ ఈగ | |
10 | +ఉ ఉడుత | |
11 | +ఊ ఊయల | |
12 | +ఋ ఋషి | |
13 | +ౠ | |
14 | +ఎ ఎలుక | |
15 | +ఏ ఏనుగు | |
16 | +ఐ ఐదు | |
17 | +ఒ ఒంటె | |
18 | +ఓ ఓడ | |
19 | +ఔ ఔషధము | |
20 | +ం అంకెలు | |
21 | +ః దుఃఖము | |
22 | +క కలము | |
23 | +ఖ ఖరము | |
24 | +గ గంట | |
25 | +ఘ ఘటము | |
26 | +ఙ | |
27 | +చ చదరము | |
28 | +ఛ ఛత్రము | |
29 | +జ జడ | |
30 | +ఝ ఝషము | |
31 | +ఞ ఆజ్ఞ | |
32 | +ట టమాట | |
33 | +ఠ కంఠము | |
34 | +డ డబ్బా | |
35 | +ఢ ఢంకా | |
36 | +ణ వీణ | |
37 | +త తల | |
38 | +థ రథము | |
39 | +ద దండ | |
40 | +ధ ధనము | |
41 | +న నగ | |
42 | +ప పలక | |
43 | +ఫ ఫలము | |
44 | +బ బడి | |
45 | +భ భజన | |
46 | +మ మంచము | |
47 | +య యముడు | |
48 | +ర రధము | |
49 | +ల లత | |
50 | +వ వల | |
51 | +శ శంకము | |
52 | +ష షరతు | |
53 | +స సబ్బు | |
54 | +హ హంస | |
55 | +ళ తాళము | |
56 | +క్ష క్షణము | |
57 | +ఱ ఱంపము | |
58 | +ా థీర్ఘము | |
59 | +ి గుడి | |
60 | +ీ గుడిథీర్ఘము | |
61 | +ు కొమ్ము | |
62 | +ూ కొమ్ముథీర్ఘము | |
63 | +ృ సుడి | |
64 | +ె ఎత్వము | |
65 | +ే ఏత్వము | |
66 | +ై ఐత్వము | |
67 | +ొ ఒత్వము | |
68 | +ో ఓత్వము | |
69 | +ౌ ఔత్వము | |
70 | +ం పూర్ణానుస్వారము | |
71 | +ః విసర్గము | |
72 | +్ పొల్లు |
@@ -9,7 +9,6 @@ import globalVars | ||
9 | 9 | from logHandler import log |
10 | 10 | import os |
11 | 11 | import codecs |
12 | -import synthDriverHandler | |
13 | 12 | import api |
14 | 13 | import config |
15 | 14 |
@@ -2,7 +2,7 @@ | ||
2 | 2 | #A part of NonVisual Desktop Access (NVDA) |
3 | 3 | #This file is covered by the GNU General Public License. |
4 | 4 | #See the file COPYING for more details. |
5 | -#Copyright (C) 2012 NV Access Limited | |
5 | +#Copyright (C) 2012-2015 NV Access Limited | |
6 | 6 | |
7 | 7 | """Update checking functionality. |
8 | 8 | @note: This module may raise C{RuntimeError} on import if update checking for this build is not supported. |
@@ -22,6 +22,9 @@ import time | ||
22 | 22 | import cPickle |
23 | 23 | import urllib |
24 | 24 | import tempfile |
25 | +import hashlib | |
26 | +import ctypes.wintypes | |
27 | +import ssl | |
25 | 28 | import wx |
26 | 29 | import languageHandler |
27 | 30 | import gui |
@@ -31,7 +34,7 @@ import shellapi | ||
31 | 34 | import winUser |
32 | 35 | |
33 | 36 | #: The URL to use for update checks. |
34 | -#CHECK_URL = "http://www.nvda-project.org/updateCheck" | |
37 | +#CHECK_URL = "https://www.nvaccess.org/nvdaUpdateCheck" | |
35 | 38 | CHECK_URL = "http://www.nvda.jp/updateCheck" |
36 | 39 | #: The time to wait between checks. |
37 | 40 | CHECK_INTERVAL = 86400 # 1 day |
@@ -67,7 +70,18 @@ def checkForUpdate(auto=False): | ||
67 | 70 | "language": languageHandler.getLanguage(), |
68 | 71 | "installed": config.isInstalledCopy(), |
69 | 72 | } |
70 | - res = urllib.urlopen("%s?%s" % (CHECK_URL, urllib.urlencode(params))) | |
73 | + url = "%s?%s" % (CHECK_URL, urllib.urlencode(params)) | |
74 | + try: | |
75 | + res = urllib.urlopen(url) | |
76 | + except IOError as e: | |
77 | + if isinstance(e.strerror, ssl.SSLError) and e.strerror.reason == "CERTIFICATE_VERIFY_FAILED": | |
78 | + # #4803: Windows fetches trusted root certificates on demand. | |
79 | + # Python doesn't trigger this fetch (PythonIssue:20916), so try it ourselves | |
80 | + _updateWindowsRootCertificates() | |
81 | + # and then retry the update check. | |
82 | + res = urllib.urlopen(url) | |
83 | + else: | |
84 | + raise | |
71 | 85 | if res.code != 200: |
72 | 86 | raise RuntimeError("Checking for update failed with code %d" % res.code) |
73 | 87 | info = {} |
@@ -184,6 +198,7 @@ class UpdateResultDialog(wx.Dialog): | ||
184 | 198 | if updateInfo: |
185 | 199 | self.isInstalled = config.isInstalledCopy() |
186 | 200 | self.urls = updateInfo["launcherUrl"].split(" ") |
201 | + self.fileHash = updateInfo.get("launcherHash") | |
187 | 202 | # Translators: A message indicating that an updated version of NVDA is available. |
188 | 203 | # {version} will be replaced with the version; e.g. 2011.3. |
189 | 204 | message = _("NVDA version {version} is available.").format(**updateInfo) |
@@ -229,7 +244,7 @@ class UpdateResultDialog(wx.Dialog): | ||
229 | 244 | |
230 | 245 | def _download(self): |
231 | 246 | if self.isInstalled: |
232 | - UpdateDownloader(self.urls).start() | |
247 | + UpdateDownloader(self.urls, fileHash=self.fileHash).start() | |
233 | 248 | else: |
234 | 249 | os.startfile(self.urls[0]) |
235 | 250 | self.Destroy() |
@@ -244,13 +259,16 @@ class UpdateDownloader(object): | ||
244 | 259 | To use, call L{start} on an instance. |
245 | 260 | """ |
246 | 261 | |
247 | - def __init__(self, urls): | |
262 | + def __init__(self, urls, fileHash=None): | |
248 | 263 | """Constructor. |
249 | 264 | @param urls: URLs to try for the update file. |
250 | 265 | @type urls: list of str |
266 | + @param fileHash: The SHA-1 hash of the file as a hex string. | |
267 | + @type fileHash: basestring | |
251 | 268 | """ |
252 | 269 | self.urls = urls |
253 | 270 | self.destPath = tempfile.mktemp(prefix="nvda_update_", suffix=".exe") |
271 | + self.fileHash = fileHash | |
254 | 272 | |
255 | 273 | def start(self): |
256 | 274 | """Start the download. |
@@ -314,6 +332,8 @@ class UpdateDownloader(object): | ||
314 | 332 | remote.fp._sock.settimeout(120) |
315 | 333 | size = int(remote.headers["content-length"]) |
316 | 334 | local = file(self.destPath, "wb") |
335 | + if self.fileHash: | |
336 | + hasher = hashlib.sha1() | |
317 | 337 | self._guiExec(self._downloadReport, 0, size) |
318 | 338 | read = 0 |
319 | 339 | chunk=DOWNLOAD_BLOCK_SIZE |
@@ -329,9 +349,13 @@ class UpdateDownloader(object): | ||
329 | 349 | if self._shouldCancel: |
330 | 350 | return |
331 | 351 | local.write(block) |
352 | + if self.fileHash: | |
353 | + hasher.update(block) | |
332 | 354 | self._guiExec(self._downloadReport, read, size) |
333 | 355 | if read < size: |
334 | 356 | raise RuntimeError("Content too short") |
357 | + if self.fileHash and hasher.hexdigest() != self.fileHash: | |
358 | + raise RuntimeError("Content has incorrect file hash") | |
335 | 359 | self._guiExec(self._downloadReport, read, size) |
336 | 360 | |
337 | 361 | def _downloadReport(self, read, size): |
@@ -461,3 +485,47 @@ def terminate(): | ||
461 | 485 | if autoChecker: |
462 | 486 | autoChecker.terminate() |
463 | 487 | autoChecker = None |
488 | + | |
489 | +# These structs are only complete enough to achieve what we need. | |
490 | +class CERT_USAGE_MATCH(ctypes.Structure): | |
491 | + _fields_ = ( | |
492 | + ("dwType", ctypes.wintypes.DWORD), | |
493 | + # CERT_ENHKEY_USAGE struct | |
494 | + ("cUsageIdentifier", ctypes.wintypes.DWORD), | |
495 | + ("rgpszUsageIdentifier", ctypes.c_void_p), # LPSTR * | |
496 | + ) | |
497 | + | |
498 | +class CERT_CHAIN_PARA(ctypes.Structure): | |
499 | + _fields_ = ( | |
500 | + ("cbSize", ctypes.wintypes.DWORD), | |
501 | + ("RequestedUsage", CERT_USAGE_MATCH), | |
502 | + ("RequestedIssuancePolicy", CERT_USAGE_MATCH), | |
503 | + ("dwUrlRetrievalTimeout", ctypes.wintypes.DWORD), | |
504 | + ("fCheckRevocationFreshnessTime", ctypes.wintypes.BOOL), | |
505 | + ("dwRevocationFreshnessTime", ctypes.wintypes.DWORD), | |
506 | + ("pftCacheResync", ctypes.c_void_p), # LPFILETIME | |
507 | + ("pStrongSignPara", ctypes.c_void_p), # PCCERT_STRONG_SIGN_PARA | |
508 | + ("dwStrongSignFlags", ctypes.wintypes.DWORD), | |
509 | + ) | |
510 | + | |
511 | +def _updateWindowsRootCertificates(): | |
512 | + crypt = ctypes.windll.crypt32 | |
513 | + # Get the server certificate. | |
514 | + sslCont = ssl._create_unverified_context() | |
515 | + u = urllib.urlopen("https://www.nvaccess.org/nvdaUpdateCheck", context=sslCont) | |
516 | + cert = u.fp._sock.getpeercert(True) | |
517 | + u.close() | |
518 | + # Convert to a form usable by Windows. | |
519 | + certCont = crypt.CertCreateCertificateContext( | |
520 | + 0x00000001, # X509_ASN_ENCODING | |
521 | + cert, | |
522 | + len(cert)) | |
523 | + # Ask Windows to build a certificate chain, thus triggering a root certificate update. | |
524 | + chainCont = ctypes.c_void_p() | |
525 | + crypt.CertGetCertificateChain(None, certCont, None, None, | |
526 | + ctypes.byref(CERT_CHAIN_PARA(cbSize=ctypes.sizeof(CERT_CHAIN_PARA), | |
527 | + RequestedUsage=CERT_USAGE_MATCH())), | |
528 | + 0, None, | |
529 | + ctypes.byref(chainCont)) | |
530 | + crypt.CertFreeCertificateChain(chainCont) | |
531 | + crypt.CertFreeCertificateContext(certCont) |
@@ -18,6 +18,7 @@ | ||
18 | 18 | - In Skype for Desktop, you can now report and review recent messages using NVDA+control+1 through NVDA+control+0; e.g. NVDA+control+1 for the most recent message and NVDA+control+0 for the tenth most recent. (#3210) |
19 | 19 | - In a conversation in Skype for Desktop, NVDA now reports when a contact is typing. (#3506) |
20 | 20 | - NVDA can now be installed silently via the commandline with out it starting the installed copy after installation. To do this, use --install-silent. (#4206) |
21 | +- Support for the Papenmeier BRAILLEX Live 20, BRAILLEX Live and BRAILLEX Live Plus braille displays. (#4614) | |
21 | 22 | |
22 | 23 | |
23 | 24 | == Changes == |
@@ -25,6 +26,7 @@ | ||
25 | 26 | - NVDA will now use the synthesizer/voice's language for character and symbol processing (including punctuation symbol names), regardless of whether automatic language switching is turned on. To turn off this feature so that NVDA again uses its interface language, uncheck the new option in Voice settings called Trust Voice's language when processing characters and symbols. (#4210) |
26 | 27 | - Support for the Newfon synthesizer has been removed. Newfon is now available as an NVDA add-on. (#3184) |
27 | 28 | - Skype for Desktop 7 or later is now required for use with NVDA; earlier versions are not supported. (#4218) |
29 | +- Downloading of NVDA updates is now more secure. (Specifically, the update information is retrieved via https and the hash of the file is verified after it is downloaded.) (#4716) | |
28 | 30 | |
29 | 31 | |
30 | 32 | == Bug Fixes == |
@@ -52,6 +54,7 @@ | ||
52 | 54 | |
53 | 55 | == Changes for Developers == |
54 | 56 | - Updated wxPython to 3.0.2.0. (#3763) |
57 | +- NVDA no longer crashes when restarting after removing or updating an add-on which imports speechDictHandler in its installTasks module. (#4496) | |
55 | 58 | |
56 | 59 | |
57 | 60 | = 2014.4 = |
@@ -1682,19 +1682,23 @@ The following Braille displays are supported: | ||
1682 | 1682 | - BRAILLEX EL 40c, EL 80c, EL 20c, EL 60c (USB) |
1683 | 1683 | - BRAILLEX EL 40s, EL 80s, EL 2d80s, EL 70s, EL 66s (USB) |
1684 | 1684 | - BRAILLEX Trio (USB and bluetooth) |
1685 | +- BRAILLEX Live 20, BRAILLEX Live and BRAILLEX Live Plus (USB and bluetooth) | |
1685 | 1686 | - |
1686 | 1687 | |
1687 | 1688 | If BrxCom is installed, NVDA will use BrxCom. |
1688 | 1689 | BrxCom is a tool that allows you to use the Braille input independently from a screen reader. |
1689 | -A new version of BrxCom which works with NVDA will be released by Papenmeier soon. | |
1690 | -However, braille input is possible with the Trio device without BrxCom. | |
1690 | +A new version of BrxCom which works with NVDA will be released by Papenmeier soon. | |
1691 | +Braille input is possible with the Trio, BRAILLEX Live 20 and Braillex Live devices without BrxCom. | |
1692 | +Braille input is also possible with the Live Plus model, but with BrxCom only. | |
1691 | 1693 | |
1692 | 1694 | Most devices have an Easy Access Bar (EAB) that allows intuitive and fast operation. |
1693 | 1695 | The EAB can be moved in four directions where generally each direction has two switches. |
1694 | -The c-series is the only exception to this rule. | |
1696 | +The C and Live series are the only exceptions to this rule. | |
1695 | 1697 | |
1696 | 1698 | The c-series and some other displays have two routing rows whereby the upper row is used to report formatting information. |
1697 | 1699 | Holding one of the upper routing keys and pressing the EAB on c-series devices emulates the second switch state. |
1700 | +The live series displays have one routing row only and the EAB has one step per direction. | |
1701 | +The second step may be emulated by pressing one of the routing keys and pressing the EAB in the corresponding direction. | |
1698 | 1702 | Pressing and holding the up, down, right and left keys (or EAB) causes the corresponding action to be repeated. |
1699 | 1703 | |
1700 | 1704 | Generally, the following keys are available on these braille displays: |