• R/O
  • HTTP
  • SSH
  • HTTPS

nvdajp: Commit

NVDA with Japanese branch


Commit MetaInfo

Révisionc6616ae67c8eea328efad384dc2005905d6f8e1d (tree)
l'heure2015-01-30 21:41:58
AuteurTakuya Nishimoto <nishimotz@gmai...>
CommiterTakuya Nishimoto

Message de Log

Merge branch 'jpbeta' into ti34812

Change Summary

Modification

--- a/contributors.txt
+++ b/contributors.txt
@@ -163,3 +163,4 @@ Dinesh Mittal
163163 Maheshinder Singh Khosla
164164 Zvonimir Stanecic
165165 Tyler Spivey
166+Siddhartha Gupta
--- a/source/brailleDisplayDrivers/papenmeier.py
+++ b/source/brailleDisplayDrivers/papenmeier.py
@@ -2,7 +2,7 @@
22 #A part of NonVisual Desktop Access (NVDA)
33 #This file is covered by the GNU General Public License.
44 #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
66 #Author: Tobias Platen (nvda@lists.thm.de)
77 #minor changes by Halim Sahin (nvda@lists.thm.de), Ali-Riza Ciftcioglu <aliminator83@googlemail.com> and James Teh
88
@@ -104,7 +104,7 @@ def brl_poll(dev):
104104
105105 def brl_decode_trio(keys):
106106 """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
108108 keys = keys[3:]
109109 i = 0
110110 j = []
@@ -227,12 +227,9 @@ class BrailleDisplayDriver(braille.BrailleDisplayDriver, ScriptableObject):
227227 port = portInfo["port"]
228228 hwID = portInfo["hardwareID"]
229229 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":
231231 try:
232232 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
236233 log.info("connectBluetooth success")
237234 except:
238235 log.debugWarning("connectBluetooth failed")
@@ -271,8 +268,7 @@ connection could not be established"""
271268 elif ftdi2:
272269 self._baud = 57600
273270 self.connectUSB(devlist)
274- if(self._dev is None):
275- return None
271+ if(self._dev is not None):
276272 try:
277273 #request type of braille display
278274 self._dev.write(brl_auto_id())
@@ -284,13 +280,14 @@ connection could not be established"""
284280 self._dev.set_baud_rate(self._baud)
285281 self._dev.purge()
286282 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
291290 else:
292- if(len(autoid) != 8):
293- return None
294291 autoid = struct.unpack('BBBBBBBB',autoid)
295292 if(autoid[3] == 0x35 and autoid[4] == 0x38):#EL80s
296293 self.numCells = 80
@@ -355,6 +352,26 @@ connection could not be established"""
355352 self._proto = 'A'
356353 self._voffset = 20
357354 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")
358375 else:
359376 log.debugWarning('UNKNOWN BRAILLE')
360377
@@ -511,7 +528,7 @@ class InputGesture(braille.BrailleDisplayGesture, brailleInput.BrailleInputGestu
511528 self.id=brl_join_keys(brl_decode_key_names_repeat(driver))
512529 return
513530
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):
515532 #get dots
516533 z = ord('0')
517534 b = ord(keys[4])-z
--- a/source/core.py
+++ b/source/core.py
@@ -1,7 +1,7 @@
11 # -*- coding: UTF-8 -*-
22 #core.py
33 #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
55 #This file is covered by the GNU General Public License.
66 #See the file COPYING for more details.
77
@@ -58,9 +58,6 @@ def doStartupDialogs():
5858 gui.messageBox(_("Your gesture map file contains errors.\n"
5959 "More details about the errors can be found in the log file."),
6060 _("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()
6461
6562 def restart(disableAddons=False):
6663 """Restarts NVDA by starting a new copy with -r."""
--- a/source/gui/upgradeAlerts.py
+++ /dev/null
@@ -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()
--- /dev/null
+++ b/source/locale/as/characterDescriptions.dic
@@ -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+ঁ
--- /dev/null
+++ b/source/locale/bn/characterDescriptions.dic
@@ -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+ঃ বিসর্গ
--- /dev/null
+++ b/source/locale/gu/characterDescriptions.dic
@@ -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+
--- /dev/null
+++ b/source/locale/kok/characterDescriptions.dic
@@ -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+
--- /dev/null
+++ b/source/locale/ml/characterDescriptions.dic
@@ -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+
--- /dev/null
+++ b/source/locale/mni/characterDescriptions.dic
@@ -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
--- /dev/null
+++ b/source/locale/te/characterDescriptions.dic
@@ -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+్ పొల్లు
--- a/source/speechDictHandler.py
+++ b/source/speechDictHandler.py
@@ -9,7 +9,6 @@ import globalVars
99 from logHandler import log
1010 import os
1111 import codecs
12-import synthDriverHandler
1312 import api
1413 import config
1514
--- a/source/updateCheck.py
+++ b/source/updateCheck.py
@@ -2,7 +2,7 @@
22 #A part of NonVisual Desktop Access (NVDA)
33 #This file is covered by the GNU General Public License.
44 #See the file COPYING for more details.
5-#Copyright (C) 2012 NV Access Limited
5+#Copyright (C) 2012-2015 NV Access Limited
66
77 """Update checking functionality.
88 @note: This module may raise C{RuntimeError} on import if update checking for this build is not supported.
@@ -22,6 +22,9 @@ import time
2222 import cPickle
2323 import urllib
2424 import tempfile
25+import hashlib
26+import ctypes.wintypes
27+import ssl
2528 import wx
2629 import languageHandler
2730 import gui
@@ -31,7 +34,7 @@ import shellapi
3134 import winUser
3235
3336 #: The URL to use for update checks.
34-#CHECK_URL = "http://www.nvda-project.org/updateCheck"
37+#CHECK_URL = "https://www.nvaccess.org/nvdaUpdateCheck"
3538 CHECK_URL = "http://www.nvda.jp/updateCheck"
3639 #: The time to wait between checks.
3740 CHECK_INTERVAL = 86400 # 1 day
@@ -67,7 +70,18 @@ def checkForUpdate(auto=False):
6770 "language": languageHandler.getLanguage(),
6871 "installed": config.isInstalledCopy(),
6972 }
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
7185 if res.code != 200:
7286 raise RuntimeError("Checking for update failed with code %d" % res.code)
7387 info = {}
@@ -184,6 +198,7 @@ class UpdateResultDialog(wx.Dialog):
184198 if updateInfo:
185199 self.isInstalled = config.isInstalledCopy()
186200 self.urls = updateInfo["launcherUrl"].split(" ")
201+ self.fileHash = updateInfo.get("launcherHash")
187202 # Translators: A message indicating that an updated version of NVDA is available.
188203 # {version} will be replaced with the version; e.g. 2011.3.
189204 message = _("NVDA version {version} is available.").format(**updateInfo)
@@ -229,7 +244,7 @@ class UpdateResultDialog(wx.Dialog):
229244
230245 def _download(self):
231246 if self.isInstalled:
232- UpdateDownloader(self.urls).start()
247+ UpdateDownloader(self.urls, fileHash=self.fileHash).start()
233248 else:
234249 os.startfile(self.urls[0])
235250 self.Destroy()
@@ -244,13 +259,16 @@ class UpdateDownloader(object):
244259 To use, call L{start} on an instance.
245260 """
246261
247- def __init__(self, urls):
262+ def __init__(self, urls, fileHash=None):
248263 """Constructor.
249264 @param urls: URLs to try for the update file.
250265 @type urls: list of str
266+ @param fileHash: The SHA-1 hash of the file as a hex string.
267+ @type fileHash: basestring
251268 """
252269 self.urls = urls
253270 self.destPath = tempfile.mktemp(prefix="nvda_update_", suffix=".exe")
271+ self.fileHash = fileHash
254272
255273 def start(self):
256274 """Start the download.
@@ -314,6 +332,8 @@ class UpdateDownloader(object):
314332 remote.fp._sock.settimeout(120)
315333 size = int(remote.headers["content-length"])
316334 local = file(self.destPath, "wb")
335+ if self.fileHash:
336+ hasher = hashlib.sha1()
317337 self._guiExec(self._downloadReport, 0, size)
318338 read = 0
319339 chunk=DOWNLOAD_BLOCK_SIZE
@@ -329,9 +349,13 @@ class UpdateDownloader(object):
329349 if self._shouldCancel:
330350 return
331351 local.write(block)
352+ if self.fileHash:
353+ hasher.update(block)
332354 self._guiExec(self._downloadReport, read, size)
333355 if read < size:
334356 raise RuntimeError("Content too short")
357+ if self.fileHash and hasher.hexdigest() != self.fileHash:
358+ raise RuntimeError("Content has incorrect file hash")
335359 self._guiExec(self._downloadReport, read, size)
336360
337361 def _downloadReport(self, read, size):
@@ -461,3 +485,47 @@ def terminate():
461485 if autoChecker:
462486 autoChecker.terminate()
463487 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)
--- a/user_docs/en/changes.t2t
+++ b/user_docs/en/changes.t2t
@@ -18,6 +18,7 @@
1818 - 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)
1919 - In a conversation in Skype for Desktop, NVDA now reports when a contact is typing. (#3506)
2020 - 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)
2122
2223
2324 == Changes ==
@@ -25,6 +26,7 @@
2526 - 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)
2627 - Support for the Newfon synthesizer has been removed. Newfon is now available as an NVDA add-on. (#3184)
2728 - 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)
2830
2931
3032 == Bug Fixes ==
@@ -52,6 +54,7 @@
5254
5355 == Changes for Developers ==
5456 - 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)
5558
5659
5760 = 2014.4 =
--- a/user_docs/en/userGuide.t2t
+++ b/user_docs/en/userGuide.t2t
@@ -1682,19 +1682,23 @@ The following Braille displays are supported:
16821682 - BRAILLEX EL 40c, EL 80c, EL 20c, EL 60c (USB)
16831683 - BRAILLEX EL 40s, EL 80s, EL 2d80s, EL 70s, EL 66s (USB)
16841684 - BRAILLEX Trio (USB and bluetooth)
1685+- BRAILLEX Live 20, BRAILLEX Live and BRAILLEX Live Plus (USB and bluetooth)
16851686 -
16861687
16871688 If BrxCom is installed, NVDA will use BrxCom.
16881689 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.
16911693
16921694 Most devices have an Easy Access Bar (EAB) that allows intuitive and fast operation.
16931695 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.
16951697
16961698 The c-series and some other displays have two routing rows whereby the upper row is used to report formatting information.
16971699 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.
16981702 Pressing and holding the up, down, right and left keys (or EAB) causes the corresponding action to be repeated.
16991703
17001704 Generally, the following keys are available on these braille displays:
Afficher sur ancien navigateur de dépôt.