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

Issue:
NVDA install fails when Windows 10's Controlled Folder Access is enabled
### Steps to reproduce:
In windows 10 Fall Creaters update:
* Enable Controlled Folder Access in windows Defender (Virus and Threat Protection -> Virus and Threat Protection Settings -> Controlled Folder Access).
* Install NVDA either by downloading and running the launcher, or via NVDA's update feature.
* If installing from the launcher, ensure that the "create desktop shortcut" checkbox is checked. It may be called "keep existing desktop shortcut" if it detects a previous install. Either way, make sure it is checked.
* Notice that the install fails near the end.

### Expected behavior:
The install should succeed with no errors.

### Actual behavior:
The install fails, as it cannot create the desktop shortcut in the allUsersDesktop directory, due to Controlled folder Access.

### System configuration:
NVDA version: 2017.3
NVDA Installed or portable: installed

Windows version: 10.0.17017


Discussion:

Resolving patch:
diff --git a/source/installer.py b/source/installer.py
--- a/source/installer.py
+++ b/source/installer.py
@@ -36,6 +36,7 @@ def _getWSH():
 defaultInstallPath=os.path.join(programFilesPath, versionInfo.name)
 
 def createShortcut(path,targetPath=None,arguments=None,iconLocation=None,workingDirectory=None,hotkey=None,prependSpecialFolder=None):
+	# #7696: The shortcut is only physically saved to disk if it does not already exist, or one or more properties have changed. 
 	wsh=_getWSH()
 	if prependSpecialFolder:
 		specialPath=wsh.SpecialFolders(prependSpecialFolder)
@@ -44,16 +45,24 @@ def createShortcut(path,targetPath=None,arguments=None,iconLocation=None,working
 		os.makedirs(os.path.dirname(path))
 	shortcutExists=os.path.isfile(path)
 	short=wsh.CreateShortcut(path)
-	short.TargetPath=targetPath
-	if arguments:
+	needsSave=not shortcutExists
+	if short.targetPath!=targetPath:
+		short.TargetPath=targetPath
+		needsSave=True
+	if arguments and short.arguments!=arguments:
 		short.arguments=arguments
+		needsSave=True
 	if not shortcutExists and hotkey:
 		short.Hotkey=hotkey
-	if iconLocation:
+		needsSave=True
+	if iconLocation and short.iconLocation!=iconLocation:
 		short.IconLocation=iconLocation
-	if workingDirectory:
+		needsSave=True
+	if workingDirectory and short.workingDirectory!=workingDirectory:
 		short.workingDirectory=workingDirectory
-	short.Save()
+		needsSave=True
+	if needsSave:
+		short.Save()
 
 def getStartMenuFolder(noDefault=False):
 	try:


Test patch:
Repository: nvaccess/nvda

Issue:
NVDA reads irrelevant text when we set focus from one i-frame to another for the first time.
NVDA remembers the last focus set in the page. When the focus is set again inside the page, it tries to set focus on the last remembered focused element.

please provide any solution for this.
 it is confusing for disable people, because it is not easy for them to diffrentiate where the actual focus is.


Discussion:
I think for now as mentioned in In Process blog and elsewhere the advice to 
use Firefox 52 ESR, particularly for those using nvda in a production 
environment has to be the way to go here, until the new Firefox engine has 
been sorted out and NVDA learns of ways on how to interact with it to the 
standard it did in the old version.
 Brian



I would respectfully disagree with this proposed functionality.
In my day to day work it is very good that nvda remembers the focus of where it was.
In my work I have a page with a large sequence of links, I have to open each link of these, and then I press backspace or alt + left arrow and it is very good that nvda is on the last link I opened, so I do not have to scroll through the entire page again for the link.
Regarding firefox 57 what I have to complain about is that the focus is not always on the last link I visited when I press alt + left arrow.
If there is an option for nvda not to remember the focus of the visited page, it would vote for this behavior to be configured.
@SandeepVerma10 Please can you amend the description of this issue to include an example (minimal) test case, and steps to reproduce the behaviour (including keys used to navigate etc). Please also include the output you actually got from NVDA (speech viewer is handy to allow you to copy this) and the output you expected to get. Please also specify the web browser you are using, and the version of NVDA.

Resolving patch:
diff --git a/source/NVDAObjects/IAccessible/sysListView32.py b/source/NVDAObjects/IAccessible/sysListView32.py
--- a/source/NVDAObjects/IAccessible/sysListView32.py
+++ b/source/NVDAObjects/IAccessible/sysListView32.py
@@ -1,7 +1,7 @@
 # -*- coding: UTF-8 -*-
 #NVDAObjects/IAccessible/sysListView32.py
 #A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2012 NV Access Limited, Peter Vágner
+#Copyright (C) 2006-2017 NV Access Limited, Peter Vágner
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
 
@@ -70,7 +70,10 @@
 LVCF_IMAGE=16
 LVCF_ORDER=32
 
-CBEMAXSTRLEN=260
+# The size of a buffer to hold text for listview items and columns etc 
+# #7828: Windows headers define this as 260 characters. However this is not long enough for modern Twitter clients that need at least 280 characters.
+# Therefore, round it up to the nearest power of 2
+CBEMAXSTRLEN=512
 
 # listview header window messages
 HDM_FIRST=0x1200


Test patch:
Repository: nvaccess/nvda

Issue:
Problems with eSpeak NG in NVDA Next Snapshot Version next-15091,d89900a3
When using NVDA version next-15091,d89900a3, speech rate does not work how it should. At rate 100 without rate boost, NVDA speaks much slower than at rate 99. With rate boost, speech slows down above rate 18 and then seems to stay at the same rate regardless of where the slider is moved as long as you stay above rate 18. Words, especially those ending in vowel sounds, also sound as if they are cut off at the ends.
I noticed this first when I updated to this snapshot. During and after the update, speech seemed much slower than I'm used to. Once I noticed this, I tried changing the speech rate and found the results I mentioned above. To reproduce this, make sure you're using eSpeak NG and try changing the rate with and without rate boost. Pay particular attention to the rate values mentioned above.
I'm using NVDA version next-15091,d89900a3 on Windows 10 version 1803 build 17134.5. I also normally use the English America voice and the Klatt4 variant at rate 45 with rate boost turned on. I posted about this in the NVDA Skype group, and others seemed to be having the same issue when they looked into it.


Discussion:

Resolving patch:
diff --git a/source/synthDrivers/_espeak.py b/source/synthDrivers/_espeak.py
--- a/source/synthDrivers/_espeak.py
+++ b/source/synthDrivers/_espeak.py
@@ -173,7 +173,9 @@ def _speak(text):
 	global isSpeaking
 	uniqueID=c_int()
 	isSpeaking = True
-	flags = espeakCHARS_WCHAR | espeakSSML | espeakPHONEMES
+	# eSpeak can only process compound emojis  when using a UTF8 encoding
+	text=text.encode('utf8',errors='ignore')
+	flags = espeakCHARS_UTF8 | espeakSSML | espeakPHONEMES
 	return espeakDLL.espeak_Synth(text,0,0,0,0,flags,byref(uniqueID),0)
 
 def speak(text):


Test patch:
Repository: nvaccess/nvda

Issue:
Update wording in add-on manager
Currently, in the add-on manager, the line with information for each add-on reports whether the add-on is "running" or "suspended".

If the currently selected add-on is running, there is a button to "disable add-on".  If the add-on is suspended, the button reads "Enable add-on".

It would be more consistent to EITHER:
- change the "status" column to report "enabled" or "disabled" (using the same terminology as the button)
or
- Change the button's label to "Enable add-on" or "disable add-on" as appropriate (bringing it into line with the current status column terminology).




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-2017 NV Access Limited, Beqa Gozalishvili, Joseph Lee, Babbage B.V.
+#Copyright (C) 2012-2017 NV Access Limited, Beqa Gozalishvili, Joseph Lee, Babbage B.V., Ethan Holliger
 
 import os
 import wx
@@ -201,17 +201,17 @@ def getAddonStatus(self,addon):
 			return _("remove")
 		# Need to do this here, as 'isDisabled' overrides other flags.
 		elif addon.isPendingDisable:
-			# Translators: The status shown for an addon when its disabled.
-			return _("disable")
+			# Translators: The status shown for an addon when it requires a restart to become disabled
+			return _("Disabled after restart")
 		elif addon.isPendingEnable:
-			# Translators: The status shown for an addon when its enabled.
-			return _("enable")
+			# Translators: The status shown for an addon when it requires a restart to become enabled
+			return _("Enabled after restart")
 		elif globalVars.appArgs.disableAddons or addon.isDisabled:
 			# Translators: The status shown for an addon when its currently suspended do to addons being disabled.
-			return _("suspended")
+			return _("disabled")
 		else:
 			# Translators: The status shown for an addon when its currently running in NVDA.
-			return _("running")
+			return _("enabled")
 
 	def refreshAddonsList(self,activeIndex=0):
 		self.addonsList.DeleteAllItems()


Test patch:
Repository: nvaccess/nvda

Issue:
Upgrade to ConfigObj 5.x.y
**Reported by nvdakor on 2014-09-19 20:51**
Hi,
As of NVDA 2014.3, ConfigObj 4.7.2 is used to retrieve, manage and store preferences. Now that a new version of ConfigObj has been released in 2014, I propose upgrading to ConfigObj 5.x.y (preferably 5.0.6, released in August 2014).
By upgrading to ConfigObj 5.x.y, NVDA users and developers will be able to:
- Save config files in folders with non-ASCII names.
- Provide easier way to upgrade NVDA's core code to Python 3.x, as ConfigObj 5.x.y supports Python 3.x. This means one less package to worry about when upgrading NVDA core to Python 3, if this ever happens.
- ConfigObj now uses Git for version control. This means we can try Git submodule from within misc deps submodule to retrieve latest ConfigObj releases. The Github page for ConfigObj is: https://github.com/DiffSK/configobj
  Thanks.



Discussion:
Comment 1 by jteh (in reply to comment description) on 2014-12-02 03:21
Replying to [nvdakor](ticket:4470):

> - Save config files in folders with non-ASCII names.

Don't we already support this? Many users have non-ASCII names in their username, which means there would be non-ASCII characters in their config path.

Hi,

See #7105 and #7429 for updated justifications. Thanks.
I've attempted an update to version 5.0.6, but it broke my config. Seems like there have been some changes that need to be addressed first.

Resolving patch:
diff --git a/source/sourceEnv.py b/source/sourceEnv.py
--- a/source/sourceEnv.py
+++ b/source/sourceEnv.py
@@ -1,6 +1,6 @@
 #sourceEnv.py
 #A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2013-2018 NV Access Limited
+#Copyright (C) 2013-2018 NV Access Limited, Leonard de Ruijter
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
 
@@ -17,6 +17,7 @@
 	os.path.join(TOP_DIR, "include", "scons", "src", "engine"),
 	os.path.join(TOP_DIR, "include", "pyserial"),
 	os.path.join(TOP_DIR, "include", "comtypes"),
+	os.path.join(TOP_DIR, "include", "configobj", "src", "configobj"),
 	os.path.join(TOP_DIR, "include", "wxPython"),
 	os.path.join(TOP_DIR, "miscDeps", "python"),
 )


Test patch:
Repository: nvaccess/nvda

Issue:
Reading of tables in LibreOffice is broken
### Steps to reproduce:
1. Create a LibreOffice document containing a table
2. Read the table

### Expected behavior:
NVDA should read the table

### Actual behavior:
NVDA reports nothing in either speech or braille and gives an error sound. It seems this is caused by the changes in #7872 and is a regression from previous versions.

### Log

```
error executing event: gainFocus on <NVDAObjects.Dynamic_SymphonyParagraphSymphonyTextEditableTextWithAutoSelectDetectionIAccessible object at 0x06CE25B0> with extra args of {}
Traceback (most recent call last):
  File "eventHandler.pyc", line 147, in executeEvent
  File "eventHandler.pyc", line 180, in doPreGainFocus
  File "compoundDocuments.pyc", line 425, in event_treeInterceptor_gainFocus
  File "speech.pyc", line 756, in speakTextInfo
  File "compoundDocuments.pyc", line 252, in getTextWithFields
  File "compoundDocuments.pyc", line 154, in _getControlFieldForObject
  File "baseObject.pyc", line 34, in __get__
  File "baseObject.pyc", line 115, in _getPropertyViaCache
  File "NVDAObjects\IAccessible\__init__.pyc", line 1085, in _get_rowSpan
NotImplementedError
```

### System configuration:

NVDA version: next-14945,86530c0a
NVDA Installed or portable: installed
Other information:

Windows version: Windows 10 Version 1709 (OS Build 16299.309)

Name and version of other software in use when reproducing the issue: LibreOffice 5.4.4.2

### Other questions:

Does the issue still occur after restarting your PC?
Yes

Have you tried any other versions of NVDA?
No, but I know this worked before


Discussion:

Resolving patch:
diff --git a/source/compoundDocuments.py b/source/compoundDocuments.py
--- a/source/compoundDocuments.py
+++ b/source/compoundDocuments.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) 2010-2018 NV Access Limited
+#Copyright (C) 2010-2018 NV Access Limited, Bram Duvigneau
 
 import winUser
 import textInfos
@@ -17,6 +17,7 @@
 import api
 import config
 import review
+from logHandler import log
 
 class CompoundTextInfo(textInfos.TextInfo):
 
@@ -151,8 +152,17 @@ def _getControlFieldForObject(self, obj, ignoreEditableText=True):
 			field["table-id"] = 1 # FIXME
 			field["table-rownumber"] = obj.rowNumber
 			field["table-columnnumber"] = obj.columnNumber
-			field['table-rowsspanned']=obj.rowSpan
-			field['table-columnsspanned']=obj.columnSpan
+			# Row/column span is not supported by all implementations (e.g. LibreOffice)
+			try:
+				field['table-rowsspanned']=obj.rowSpan
+			except NotImplementedError:
+				log.debug("Row span not supported")
+				pass
+			try:
+				field['table-columnsspanned']=obj.columnSpan
+			except NotImplementedError:
+				log.debug("Column span not supported")
+				pass
 		return field
 
 	def __eq__(self, other):


Test patch:
Repository: nvaccess/nvda

Issue:
Windows 10: NVDA announces "unknown" when opening and closing quick link menu (Windows+X)
Hi,

Reported by several people: in Windows 10, when one opens quick link menu (Windows+X), NVDA announces "unknown".

STR:

1. Press Windows+X to open quick link menu.
2. Select an item.

Expected: no "unknown".
Actual: "unknown" is announced.
Cause: an app launcher or an unknown window gains focus.

Related to: #5116, #6671.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/appModules/explorer.py b/source/appModules/explorer.py
--- a/source/appModules/explorer.py
+++ b/source/appModules/explorer.py
@@ -1,6 +1,6 @@
 #appModules/explorer.py
 #A part of NonVisual Desktop Access (NVDA)
-#Copyright (C) 2006-2017 NV Access Limited, Joseph Lee
+#Copyright (C) 2006-2018 NV Access Limited, Joseph Lee
 #This file is covered by the GNU General Public License.
 #See the file COPYING for more details.
 
@@ -267,10 +267,11 @@ def event_gainFocus(self, obj, nextHandler):
 			# Therefore, if there is a pending focus event, don't bother handling this event.
 			return
 
-		if wClass == "ForegroundStaging":
-			# #5116: The Windows 10 Task View fires foreground/focus on this weird invisible window before and after it appears.
+		if wClass in ("ForegroundStaging", "LauncherTipWnd", "ApplicationManager_DesktopShellWindow"):
+			# #5116: The Windows 10 Task View fires foreground/focus on this weird invisible window and foreground staging screen before and after it appears.
 			# This causes NVDA to report "unknown", so ignore it.
 			# We can't do this using shouldAllowIAccessibleFocusEvent because this isn't checked for foreground.
+			# #8137: also seen when opening quick link menu (Windows+X) on Windows 8 and later.
 			return
 
 		if wClass == "WorkerW" and obj.role == controlTypes.ROLE_PANE and obj.name is None:


Test patch:
Repository: nvaccess/nvda

Issue:
hims smart beetle not working as expected
When connecting a smart beetle display from hims, I get the following issues:
1. Many keys on the display do not work: the two scrolling keys don't work and the function keys for control, windows, alt and home don't work either. The braille input keyboard does work though.
2. When the display is disconected and reconnected, nvda doesn't automatically use the display again. I have to go into the braille settings dialog and press ok for it to work.



Discussion:
Thanks for reporting. I'm working on this in #6063 and will probably send in a pull request before next friday. I'd really appreciate your testing whenever it is ready. I"m afraid your second point is hard to fix though.

I think we can discuss this issue and related ones in #6063.

> 1. When the display is disconected and reconnected, nvda doesn't automatically use the display again. I have to go into the braille settings dialog and press ok for it to work.

See also #1271.

Hi @roelvdwal,
You can assign keyboard modifiers to the function keys on the Smart Beetle by manually editing gestures.ini. Here is my gestures.ini, where I've assigned some keys to Control, Windows, Alt and (in my case) Shift:

[globalCommands.GlobalCommands]
kb:alt = br(hims):advance3
kb:shift = br(hims):advance2
kb:control = br(hims):advance1
kb:windows = br(hims):advance4


Resolving patch:
diff --git a/source/brailleDisplayDrivers/hims.py b/source/brailleDisplayDrivers/hims.py
--- a/source/brailleDisplayDrivers/hims.py
+++ b/source/brailleDisplayDrivers/hims.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) 2010-2017 Gianluca Casalino, NV Access Limited, Babbage B.V., Leonard de Ruijter, Bram Duvigneau
+#Copyright (C) 2010-2018 Gianluca Casalino, NV Access Limited, Babbage B.V., Leonard de Ruijter, Bram Duvigneau
 
 import _winreg
 import serial
@@ -69,7 +69,9 @@ def _get_keys(self):
 			0x02<<8: "f1",
 			0x04<<8: "f2",
 			0x08<<8: "f3",
-			0x10<<8: "f4"
+			0x10<<8: "f4",
+			0x20<<8: "leftSideScroll",
+			0x40<<8: "rightSideScroll",
 		})
 
 class BrailleSense(Model):
@@ -81,8 +83,6 @@ class BrailleSense(Model):
 	def _get_keys(self):
 		keys = super(BrailleSense, self)._get_keys()
 		keys.update({
-			0x20<<8: "leftSideScroll",
-			0x40<<8: "rightSideScroll",
 			0x01<<16: "leftSideScrollUp",
 			0x02<<16: "leftSideScrollDown",
 			0x04<<16: "rightSideScrollUp",


Test patch:
Repository: nvaccess/nvda

Issue:
Request to add Swedish 8-dot Braille support
I've had a request (From a Facebook user) to add support for Swedish 8-dot Braille, please.  LibLouis does have support for Swedish 8-dot Braille.


Discussion:
CC @DKager and other Liblouis folks.

 

From: Quentin Christensen <notifications@github.com> 
Sent: Wednesday, May 2, 2018 4:31 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [nvaccess/nvda] Request to add Swedish 8-dot Braille support (#8226)

 

I've had a request (From a Facebook user) to add support for Swedish 8-dot Braille, please. LibLouis does have support for Swedish 8-dot Braille.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/8226> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkKTd5UsgqZI-c_O6R904CRV2u8siks5tukHKgaJpZM4TwTtQ> .



Resolving patch:
diff --git a/source/brailleTables.py b/source/brailleTables.py
--- a/source/brailleTables.py
+++ b/source/brailleTables.py
@@ -331,6 +331,9 @@ def listTables():
 addTable("sa-in-g1.utb", _("Sanskrit grade 1"))
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.
+addTable("Se-Se.ctb", _("Swedish 8 dot computer braille"))
+# Translators: The name of a braille table displayed in the
+# braille settings dialog.
 addTable("Se-Se-g1.utb", _("Swedish grade 1"))
 # Translators: The name of a braille table displayed in the
 # braille settings dialog.


Test patch:
Repository: nvaccess/nvda

Issue:
There is no command to emulate the alt key from the braille display
In Input gestures/Emulated system keyboard keys, there is no alt key for emulating it from the keyboard of the braille display. Probably in the globalCommands.py typo on line 2020.


Discussion:

Resolving patch:
diff --git a/source/globalCommands.py b/source/globalCommands.py
--- a/source/globalCommands.py
+++ b/source/globalCommands.py
@@ -2017,8 +2017,8 @@ def script_braille_toggleAlt(self, gesture):
 	def script_braille_toggleWindows(self, gesture):
 		brailleInput.handler.toggleModifier("leftWindows")
 	# Translators: Input help mode message for a braille command.
-	script_braille_toggleAlt.__doc__= _("Virtually toggles the left windows key to emulate a keyboard shortcut with braille input")
-	script_braille_toggleAlt.category=inputCore.SCRCAT_KBEMU
+	script_braille_toggleWindows.__doc__= _("Virtually toggles the left windows key to emulate a keyboard shortcut with braille input")
+	script_braille_toggleWindows.category=inputCore.SCRCAT_KBEMU
 	script_braille_toggleAlt.bypassInputHelp = True
 
 	def script_braille_toggleNVDAKey(self, gesture):


Test patch:
Repository: nvaccess/nvda

Issue:
UIA handler: use CUIAutomation8 COM interfaces to retrieve highest supported UIA version
Hi,

This is a follow-up to #8009:

In #8009, when locating highest supported UIA interface, a static list of UIA interfaces were queried (IUIA5 to IUIA2). It turns out CUIAutomation8 includes a list of supported UIA interfaces (UIAHandler.CUIAutomation8._com_interfaces_). Thus it would be better to consult this static list instead of hunting from a static list of interfaces defined by programmers.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/_UIAHandler.py b/source/_UIAHandler.py
--- a/source/_UIAHandler.py
+++ b/source/_UIAHandler.py
@@ -188,7 +188,8 @@ def MTAThreadFunc(self):
 				self.clientObject=CoCreateInstance(CUIAutomation._reg_clsid_,interface=IUIAutomation,clsctx=CLSCTX_INPROC_SERVER)
 			if isUIA8:
 				# #8009: use appropriate interface based on highest supported interface.
-				for interface in (IUIAutomation5, IUIAutomation4, IUIAutomation3, IUIAutomation2):
+				# #8338: made easier by traversing interfaces supported on Windows 8 and later in reverse.
+				for interface in reversed(CUIAutomation8._com_interfaces_):
 					try:
 						self.clientObject=self.clientObject.QueryInterface(interface)
 						break


Test patch: