internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: nvaccess/nvda

Issue:
Support toast notifications in Skype for Business
### Steps to reproduce:
With NVDA running:
1. Start Skype for Business 2016 on two separate machines, logged into separate accounts with the same organisation
2. From machine A: Find the account logged into on machine B, and type a message to that account. 
Note that machine B should not have an open chat window with the first account while you do this.
3. a toast notification will appear on machine b notifying the user they have a pending chat.

### Expected behavior:
NVDA should report the content of the toast notification in speech and braille.

### Actual behavior:
NVDA reports nothing at all.

### Technical info:
Skype for business uses a non-standard toast notification. It fires a systemAlert UI Automation event on the accept button which contains the content of the message including the shortcut key to activate it.

NVDA should handle UIA systemAlert by reporting the element that received the event.


Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/UIA/__init__.py b/source/NVDAObjects/UIA/__init__.py
--- a/source/NVDAObjects/UIA/__init__.py
+++ b/source/NVDAObjects/UIA/__init__.py
@@ -1289,6 +1289,16 @@ def event_valueChange(self):
 			return
 		return super(UIA, self).event_valueChange()
 
+	def event_UIA_systemAlert(self):
+		"""
+		A base implementation for UI Automation's system Alert event.
+		This just reports the element that received the alert in speech and braille, similar to how focus is presented.
+		Skype for business toast notifications being one example.
+		"""
+		speech.speakObject(self, reason=controlTypes.REASON_FOCUS)
+		# Ideally, we wouldn't use getBrailleTextForProperties directly.
+		braille.handler.message(braille.getBrailleTextForProperties(name=self.name, role=self.role))
+
 class TreeviewItem(UIA):
 
 	def _get_value(self):
diff --git a/source/_UIAHandler.py b/source/_UIAHandler.py
--- a/source/_UIAHandler.py
+++ b/source/_UIAHandler.py
@@ -131,6 +131,7 @@
 	#UIA_AsyncContentLoadedEventId:"documentLoadComplete",
 	#UIA_ToolTipClosedEventId:"hide",
 	UIA_Window_WindowOpenedEventId:"UIA_window_windowOpen",
+	UIA_SystemAlertEventId:"UIA_systemAlert",
 }
 
 class UIAHandler(COMObject):


Test patch:
Repository: nvaccess/nvda

Issue:
Windows 10 Mail app: browse mode fails to activate when opening a message, requiring one to use caret mode
Hi,

Several people (including @MichaelDCurran) have confirmed the following:

In Windows 10 Mail app with updates released in 2017, when opening a message, browse mode fails to activate, requiring users to use caret browsing mode (F7).

STR:

1. Open Mail.
2. Select a message to read.

Expected: browse mode is activated.
Actual: cannot navigate with arrow keys.
Reproducible: yes.
Workaround: caret browsing must be used.

Setup:

* NVDA: next.14115
* OS: Windows 10 Version 1703 (build 15063) and various Insider Preview builds

Thanks.


Discussion:

Resolving patch:
diff --git a/source/appModules/hxoutlook.py b/source/appModules/hxoutlook.py
new file mode 100644
--- /dev/null
+++ b/source/appModules/hxoutlook.py
@@ -0,0 +1,7 @@
+#A part of NonVisual Desktop Access (NVDA)
+#Copyright (C) 2017 NV Access Limited
+#This file is covered by the GNU General Public License.
+#See the file COPYING for more details.
+
+# An alias for hxmail appModule
+from hxmail import *


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA fails to read cells in Excel 2003
### Steps to reproduce:
Running NVDA 2017.2 and Excel 2003, move around an Excel worksheet with the arrow keys. Note that NVDA does not announce the active cell.
An error is generated in NVDA's log:
```
ERROR - eventHandler.executeEvent (09:03:43):
error executing event: gainFocus on <NVDAObjects.window.excel.ExcelCell object at 0x04F92BB0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyo", line 143, in executeEvent
  File "eventHandler.pyo", line 91, in __init__
  File "eventHandler.pyo", line 98, in next
  File "C:\Users\User\AppData\Roaming\nvda\addons\remote\globalPlugins\remoteClient\__init__.py", line 341, in event_gainFocus
  File "eventHandler.pyo", line 98, in next
  File "NVDAObjects\__init__.pyo", line 899, in event_gainFocus
  File "NVDAObjects\window\excel.pyo", line 1413, in reportFocus
  File "textInfos\offsets.pyo", line 392, in getTextWithFields
  File "NVDAObjects\window\excel.pyo", line 948, in _getFormatFieldAndOffsets
  File "comtypesMonkeyPatches.pyo", line 37, in new__getattr__
  File "comtypes\client\dynamic.pyo", line 93, in __getattr__
  File "comtypes\automation.pyo", line 643, in GetIDsOfNames
COMError: (-2147352570, 'Unknown name.', (None, None, None, 0, None))
```

### Technical info:
The 'displayFormat' property does not exist on Excel range objects prior to Excel version 13.0. However, the check (around line 948 of source/NVDAObjects/window/excel.py) compares two strings, which does not yield correct results when comparing single digit verses double digit versions. For example:
```
"8.0" > "12.0"
```
evaluates to true when really the rest of the code expects false.
Thus we need to convert the part before the decimal point to an integer when comparing.


Discussion:

Resolving patch:
diff --git a/source/NVDAObjects/window/excel.py b/source/NVDAObjects/window/excel.py
--- a/source/NVDAObjects/window/excel.py
+++ b/source/NVDAObjects/window/excel.py
@@ -33,6 +33,8 @@
 import inputCore
 import ctypes
 
+excel2010VersionMajor=14
+
 xlNone=-4142
 xlSimple=-4154
 xlExtended=3
@@ -944,7 +946,10 @@ class ExcelCellTextInfo(NVDAObjectTextInfo):
 
 	def _getFormatFieldAndOffsets(self,offset,formatConfig,calculateOffsets=True):
 		formatField=textInfos.FormatField()
-		if (self.obj.excelCellObject.Application.Version > "12.0"):
+		versionMajor=int(self.obj.excelCellObject.Application.Version.split('.')[0])
+		if versionMajor>=excel2010VersionMajor:
+			# displayFormat includes conditional formatting calculated at runtime
+			# However it is only available in Excel 2010 and higher
 			cellObj=self.obj.excelCellObject.DisplayFormat
 		else:
 			cellObj=self.obj.excelCellObject


Test patch:
Repository: nvaccess/nvda

Issue:
serious problem in latest espeak
hello.

georgian language support is broken in latest espeak update.
leters arespelled there.


Discussion:

Resolving patch:
diff --git a/site_scons/site_tools/recursiveInstall.py b/site_scons/site_tools/recursiveInstall.py
--- a/site_scons/site_tools/recursiveInstall.py
+++ b/site_scons/site_tools/recursiveInstall.py
@@ -36,12 +36,6 @@ def recursive_install(env, path ):
         ( os.path.join(path, '*')
         , strings=False
         )
-    nodes.extend \
-            ( env.Glob \
-                ( os.path.join(path, '*.*')
-                , strings=False
-                )
-            )
     out = []
     for n in nodes:
         if n.isdir():
@@ -70,4 +64,4 @@ def generate(env):
     env.AddMethod(RecursiveInstall)
 
 def exists(env):
-    return True
\ No newline at end of file
+    return True
diff --git a/source/synthDrivers/espeak.py b/source/synthDrivers/espeak.py
--- a/source/synthDrivers/espeak.py
+++ b/source/synthDrivers/espeak.py
@@ -193,9 +193,11 @@ def _getAvailableVoices(self):
 		voices=OrderedDict()
 		for v in _espeak.getVoiceList():
 			l=v.languages[1:]
+			# #7167: Some languages names contain unicode characters EG: Norwegian Bokmål
+			name=v.name.decode("UTF-8")
 			# #5783: For backwards compatibility, voice identifies should always be lowercase
 			identifier=os.path.basename(v.identifier).lower()
-			voices[identifier]=VoiceInfo(identifier,v.name,l)
+			voices[identifier]=VoiceInfo(identifier,name,l)
 		return voices
 
 	def _get_voice(self):


Test patch:
Repository: nvaccess/nvda

Issue:
Unnecessary import in api.py
The `braille` module is imported in `setReviewPosition` but is also globally imported at the top of the file. The function-specific one is redundant. Or if it's not, a line of documentation would be nice to explain this.


Discussion:
Nope, the function specific import is redundant and can be removed.
Do you want a PR or can you sneak in a quick commit? :)
We can do this as part of #2385 probably, since we might have to hack 
into that function.


Resolving patch:
diff --git a/source/api.py b/source/api.py
--- a/source/api.py
+++ b/source/api.py
@@ -183,7 +183,6 @@ def setReviewPosition(reviewPosition,clearNavigatorObject=True):
 	globalVars.reviewPosition=reviewPosition.copy()
 	globalVars.reviewPositionObj=reviewPosition.obj
 	if clearNavigatorObject: globalVars.navigatorObject=None
-	import braille
 	braille.handler.handleReviewMove()
 
 def getNavigatorObject():


Test patch:
Repository: nvaccess/nvda

Issue:
Don't announce end-of-container when quick navigation keys are used in browse mode
**Reported by aliminator on 2012-08-10 07:33**
NVDA announces end-of-container when jumping somewhere else using the navigation quick navigation keys.
Visiting for example 
[http://en.wikipedia.org/wiki/Football_at_the_2012_Summer_Olympics]
and navigating to the table of contents.
In the list, when pressing the h key to get to tthe next heading, NVDA announces end-of-list (maybe multiple times, depending on the nesting).
This behaviour should be turned off in this case because users can act quicker and don't need to wait till end-of-container is announced.



Discussion:
Comment 2 by halim on 2013-02-01 11:19
Other screenreaders don't anounce this. I know only nvda which does and some times it's really anoying.
ACK, this should be turned of or configurable for those who wants/ needs this!

2017 web fix?
It's a common request, so I'll include it in webfix for now, but I think it's lower priority than other webfix issues, not least because there is some controversy surrounding it.

Resolving patch:
diff --git a/source/speech.py b/source/speech.py
--- a/source/speech.py
+++ b/source/speech.py
@@ -800,16 +800,18 @@ def speakTextInfo(info,useCache=True,formatConfig=None,unit=None,reason=controlT
 		else:
 			break
 
-	#Get speech text for any fields in the old controlFieldStack that are not in the new controlFieldStack 
-	endingBlock=False
-	for count in reversed(xrange(commonFieldCount,len(controlFieldStackCache))):
-		text=info.getControlFieldSpeech(controlFieldStackCache[count],controlFieldStackCache[0:count],"end_removedFromControlFieldStack",formatConfig,extraDetail,reason=reason)
-		if text:
-			speechSequence.append(text)
-		if not endingBlock and reason==controlTypes.REASON_SAYALL:
-			endingBlock=bool(int(controlFieldStackCache[count].get('isBlock',0)))
-	if endingBlock:
-		speechSequence.append(SpeakWithoutPausesBreakCommand())
+	# #2591: Only if the reason is not focus, Speak the exit of any controlFields not in the new stack.
+	# We don't do this for focus because hearing "out of list", etc. isn't useful when tabbing or using quick navigation and makes navigation less efficient.
+	if reason!=controlTypes.REASON_FOCUS:
+		endingBlock=False
+		for count in reversed(xrange(commonFieldCount,len(controlFieldStackCache))):
+			text=info.getControlFieldSpeech(controlFieldStackCache[count],controlFieldStackCache[0:count],"end_removedFromControlFieldStack",formatConfig,extraDetail,reason=reason)
+			if text:
+				speechSequence.append(text)
+			if not endingBlock and reason==controlTypes.REASON_SAYALL:
+				endingBlock=bool(int(controlFieldStackCache[count].get('isBlock',0)))
+		if endingBlock:
+			speechSequence.append(SpeakWithoutPausesBreakCommand())
 	# The TextInfo should be considered blank if we are only exiting fields (i.e. we aren't entering any new fields and there is no text).
 	isTextBlank=True
 


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA does not return the sound of the audios to normalized using the voice synthesizer windows one core
I changed the nvda synthesizer to the one-core windows voices and noticed a problem.
When playing a song using any audio player the nvda lowers the sound as long as there is talk, however when the voice for the sound does not return to normalised Audio.
The nvda's hen reduction setting is to redirect sounds when playing speech.
This problem did not occur when using another speech synthesizer as nuance vocalizer exprecive 1.1.
I am with nvda next 14215 and windows 10 15063.483.


Discussion:
@jcsteh 
Confirmed. STR:

1. Switch to the Windows OneCore Voices synthesiser.
2. Play some music.
3. Use NVDA+shift+d to set NVDA's audio ducking mode to "Duck when outputting speech and sounds".
    - Expected: After NVDA finishes speaking, audio should be unducked after a short delay.
    - Actual: NVDA finishes speaking, but audio is never unducked.

I must be missing a call to WavePlayer.idle somewhere.

Resolving patch:
diff --git a/source/synthDrivers/oneCore.py b/source/synthDrivers/oneCore.py
--- a/source/synthDrivers/oneCore.py
+++ b/source/synthDrivers/oneCore.py
@@ -173,6 +173,7 @@ def _processQueue(self):
 			# which will eventually process the queue again.
 			self._dll.ocSpeech_speak(self._handle, item)
 			return
+		self._player.idle()
 		log.debug("Queue empty, done processing")
 		self._isProcessing = False
 


Test patch:
Repository: nvaccess/nvda

Issue:
Report current version on addon updates
**Reported by leonarddr on 2015-08-29 05:27**
When you install an addon that is already installed, NVDA asks you to update. I think it can be a handy addition whenever NVDA reports the current version of the addon as well as the version being updated to. Furthermore, a downgrade warning could be considered in line with NVDAs update meganism.



Discussion:

Resolving patch:
diff --git a/source/gui/addonGui.py b/source/gui/addonGui.py
--- a/source/gui/addonGui.py
+++ b/source/gui/addonGui.py
@@ -2,7 +2,7 @@
 #A part of NonVisual Desktop Access (NVDA)
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
-#Copyright (C) 2012-2016 NV Access Limited, Beqa Gozalishvili, Joseph Lee, Babbage B.V.
+#Copyright (C) 2012-2017 NV Access Limited, Beqa Gozalishvili, Joseph Lee, Babbage B.V.
 
 import os
 import wx
@@ -129,12 +129,26 @@ def installAddon(self, addonPath, closeAfter=False):
 					prevAddon=addon
 					break
 			if prevAddon:
-				# Translators: A message asking if the user wishes to update a previously installed add-on with this one.
-				if gui.messageBox(_("A version of this add-on is already installed. Would you like to update it?"),
-				# Translators: A title for the dialog  asking if the user wishes to update a previously installed add-on with this one.
-				_("Add-on Installation"),
-				wx.YES|wx.NO|wx.ICON_WARNING)!=wx.YES:
-					return
+				summary=bundle.manifest["summary"]
+				curVersion=prevAddon.manifest["version"]
+				newVersion=bundle.manifest["version"]
+				if gui.messageBox(
+					# Translators: A message asking if the user wishes to update an add-on with the same version currently installed according to the version number.
+					_("You are about to install version {newVersion} of {summary}, which appears to be already installed. Would you still like to update?").format(
+						summary=summary,
+						newVersion=newVersion
+					)
+					if curVersion==newVersion else 
+					# Translators: A message asking if the user wishes to update a previously installed add-on with this one.
+					_("A version of this add-on is already installed. Would you like to update {summary} version {curVersion} to version {newVersion}?").format(
+						summary=summary,
+						curVersion=curVersion,
+						newVersion=newVersion
+					),
+					# Translators: A title for the dialog  asking if the user wishes to update a previously installed add-on with this one.
+					_("Add-on Installation"),
+					wx.YES|wx.NO|wx.ICON_WARNING)!=wx.YES:
+						return
 				prevAddon.requestRemove()
 			progressDialog = gui.IndeterminateProgressDialog(gui.mainFrame,
 			# Translators: The title of the dialog presented while an Addon is being installed.


Test patch:
Repository: nvaccess/nvda

Issue:
Make the Read status bar command copy its contents on third press like Report window title
**Reported by Ahiiron on 2011-09-13 18:50**
Something I think would be nice is the ability to have the status line copied to the clipboard when pressed thrice, similar to say window title.



Discussion:
Seems to be a useful feature and quite easy to implement, but low on priority.
Added goodForNewDev label, since this might be good for a new dev :)

Resolving patch:
diff --git a/source/globalCommands.py b/source/globalCommands.py
--- a/source/globalCommands.py
+++ b/source/globalCommands.py
@@ -3,7 +3,7 @@
 #A part of NonVisual Desktop Access (NVDA)
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
-#Copyright (C) 2006-2016 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V.
+#Copyright (C) 2006-2016 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V., Ethan Holliger
 
 import time
 import itertools
@@ -1361,10 +1361,14 @@ def script_reportStatusLine(self,gesture):
 			return
 		if scriptHandler.getLastScriptRepeatCount()==0:
 			ui.message(text)
-		else:
+		elif scriptHandler.getLastScriptRepeatCount()==1:
 			speech.speakSpelling(text)
+		else:
+			if api.copyToClip(text):
+				# Translators: The message presented when the status bar is copied to the clipboard.
+				ui.message(_("%s copied to clipboard")%text)
 	# Translators: Input help mode message for report status line text command.
-	script_reportStatusLine.__doc__ = _("Reads the current application status bar and moves the navigator to it. If pressed twice, spells the information")
+	script_reportStatusLine.__doc__ = _("Reads the current application status bar and moves the navigator to it. If pressed twice, spells the information. If pressed three times, copies the status bar to the clipboard")
 	script_reportStatusLine.category=SCRCAT_FOCUS
 
 	def script_toggleMouseTracking(self,gesture):


Test patch:
Repository: nvaccess/nvda

Issue:
Add Vietnamese braille translation table to NVDA
According to [vi-g1.ctb's history page](https://github.com/liblouis/liblouis/commits/master/tables/vi-g1.ctb), the Vietnamese Grade 1 table has been available since February 13, 2015. It is, according to the headers, based on fr-fr-g1.utb, and supports Unicode-encoded Vietnamese text, as opposed to TCVN3  or VNI. From a brief look at the code table, it does match with the [Vietnamese Braille code](http://www.saomaiedufund.info/vnbraille/alfa02.htm) found on Sao Mai Education Fund's site. Unlike vi.ctb, this table was actually created by Harri Pasanen, rather than automatically generated by ttbtest.

For the reasons above, I believe that vi-g1.ctb's should be added to NVDA in order to support Vietnamese Grade 1. vi.ctb appears to be a Vietnamese 8-dot computer braille table, but I am unsure of its viability, not having an actual reference page for it.


Discussion:

Resolving patch:
diff --git a/source/brailleTables.py b/source/brailleTables.py
--- a/source/brailleTables.py
+++ b/source/brailleTables.py
@@ -348,6 +348,9 @@ def listTables():
 addTable("unicode-braille.utb", _("Unicode braille"), output=False)
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.
+addTable("vi-g1.ctb", _("Vietnamese grade 1"))
+# Translators: The name of a braille table displayed in the
+# braille settings dialog.
 addTable("zh-hk.ctb", _("Chinese (Hong Kong, Cantonese)"))
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.


Test patch:
Repository: nvaccess/nvda

Issue:
Add accelerator for "Windows 10 OCR..." option
### Steps to reproduce:

1. Open the NVDA preferences submenu (`NVDA+n` then `p`)
2. Notice that all options have an accelerator set except for "Windows 10 OCR..."
3. Press 'w'
4. Notice that the "Windows 10 OCR... " options dialog is opened.

### Expected behavior:
Expected this item to have an accelerator explicitly set (an underlined w for instance)

### Actual behavior:
There is no explicit accelerator, and but there is an implicit accelerator: `w`

### System configuration:
NVDA version: 14290,07052e9d

NVDA Installed or portable:
installed.

Windows version:
Windows 10


Discussion:
Setting as priority 2 since its a recent feature, and this will be very quick to fix.
We don't want this to go into the next release (2017.3), since it will affect the translations and is a minor issue.

Resolving patch:
diff --git a/source/gui/__init__.py b/source/gui/__init__.py
--- a/source/gui/__init__.py
+++ b/source/gui/__init__.py
@@ -1,7 +1,7 @@
 # -*- coding: UTF-8 -*-
 #gui/__init__.py
 #A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2015 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee
+#Copyright (C) 2006-2017 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Mesar Hameed, Joseph Lee, Thomas Stivers
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
 
@@ -361,7 +361,7 @@ def __init__(self, frame):
 		self.Bind(wx.EVT_MENU, frame.onDocumentFormattingCommand, item)
 		if winVersion.isUwpOcrAvailable():
 			# Translators: The label for the menu item to open the Windows 10 OCR settings dialog.
-			item = menu_preferences.Append(wx.ID_ANY, _("Windows 10 OCR..."))
+			item = menu_preferences.Append(wx.ID_ANY, _("&Windows 10 OCR..."))
 			self.Bind(wx.EVT_MENU, frame.onUwpOcrCommand, item)
 		subMenu_speechDicts = wx.Menu()
 		if not globalVars.appArgs.secure:


Test patch: