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

Issue:
support for Media Player Classic 64 bit
Greetings.
I like the fact that NVDA has support for Media Player Classic. This support does not however transfer to the 64 bit version. Funny enough, I investigated the matter. In the library.zip folder, if I copied the mpc-hc.pyo file and renamed it mpc-hc64.pyo based on the application name, it works equally well with NVDA, supporting the status bar and other features. Can this be done to the main distribution?



Discussion:
K-lite Mega Codec Pack is about the only media player package NVDA works well with.

This is very easy to do. For example, see the miranda64 appModule. Marking as good for new dev.

Resolving patch:
diff --git a/source/appModules/mpc-hc64.py b/source/appModules/mpc-hc64.py
new file mode 100644
--- /dev/null
+++ b/source/appModules/mpc-hc64.py
@@ -0,0 +1,8 @@
+# -*- coding: UTF-8 -*-
+# A part of NonVisual Desktop Access (NVDA)
+# Copyright (C) 2018 NV Access Limited, Łukasz Golonka
+# This file may be used under the terms of the GNU General Public License, version 2 or later.
+# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
+
+from mplayerc import *
+


Test patch:
Repository: nvaccess/nvda

Issue:
Microsoft Edge: Reading View notification is not announced
Hi,

Microsoft Edge comes with Reading view, a way to reformat the current page for smooth reading. However, NVDA does not announce certain notifications about it, including on pages where this view is not supported. Investigation shows this is tied to notification event introduced in IUIA5.

### Steps to reproduce:

1. Open Google with Edge.
2. Press Control+Shift+R to enable reading view.
> Please also remember to attach a zip of any files required to reproduce the issue.

### Expected behavior:
NVDA announces, "reading view is not available for this page".

### Actual behavior:
No announcement.

### System configuration:
NVDA next.15316 (installed), Windows 10 April 2018 Update.

### Other questions:
Reproducible: yes.
Did restart help: no.

### Technical details:
Certain notifications are sent via UiaRaiseNotificationEvent (see #7984 for details), and reading view announcement is one of them. At the moment NVDA checks to make sure focused control is part of the active application where the notification came from, but Edge uses at least two processes when run:

* MicrosoftEdge.exe: main process.
* MicrosoftEdgeCP.exe: content process.

Notifications are sent by the first process, thus failing the notification announcement criteria.

### Solution:
The Edge app module (microsoftedge.py) will gain notification event handler that'll announce all messages. This was tested on Windows 10 App Essentials add-on and was successful.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/appModules/microsoftedge.py b/source/appModules/microsoftedge.py
new file mode 100644
--- /dev/null
+++ b/source/appModules/microsoftedge.py
@@ -0,0 +1,21 @@
+# MicrosoftEdge.py
+#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) 2018 NV Access Limited, Joseph Lee
+
+"""appModule for Microsoft Edge main process"""
+
+import appModuleHandler
+import api
+import ui
+
+class AppModule(appModuleHandler.AppModule):
+
+	def event_UIA_notification(self, obj, nextHandler, displayString=None, **kwargs):
+		# #8423: even though content process is focused, notifications are fired by main Edge process.
+		# The base object will simply ignore this, so notifications must be announced here and no more.
+		# And no, notifications should be limited to Edge context - that is, focused item is part of Edge (both main and content processes).
+		if api.getFocusObject().appModule.appName.startswith("microsoftedge"):
+			ui.message(displayString)
+


Test patch:
Repository: nvaccess/nvda

Issue:
Disable Welcome Dialog entry in the NVDA menu on the logon screen (secure desktop)
### Path (secure desktop):
NVDA menu » Help » Welcome Dialog...
Actual behaviour:
The above menu entry is shown on the Windows logon screen (secure desktop). I'm asking me why?
Expected behaviour:
This menu entry shouldn't be shown in secure desktop environmental because it makes no sense for me – as there isn't a way to save the current configuration through the NVDA menu as well.
### System configuration:
#### NVDA version:
2015.3 to 2018.1 (higher versions aren't installed on my PCs yet.)
#### Windows version:
Windows 7, 64-Bit, SP1


Discussion:
Hi, right, an oversight. @MichaelDCurran, can we remove this entry while NVDA is running in secure mode? Thanks.

 

From: Daniel Mayr <notifications@github.com> 
Sent: Thursday, July 19, 2018 12:32 AM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [nvaccess/nvda] Disable Welcome Dialog entry in the NVDA menu on the logon screen (secure desktop) (#8520)

 


Path (secure desktop):


NVDA menu » Help » Welcome Dialog...
Actual behaviour:
The above menu entry is shown on the Windows logon screen (secure desktop). I'm asking me why?
Expected behaviour:
This menu entry shouldn't be shown in secure desktop environmental because it makes no sense for me – as there isn't a way to save the current configuration through the NVDA menu as well.


System configuration:


NVDA version:


2015.3 to 2018.1 (higher versions aren't installed on my PCs yet.)


Windows version:


Windows 7, 64-Bit, SP1

—
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/8520> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AHgLkNGNcZCluauBmpdG3UZ_nBTssdDSks5uIDX9gaJpZM4VV5Bz> .



Resolving patch:
diff --git a/source/gui/__init__.py b/source/gui/__init__.py
--- a/source/gui/__init__.py
+++ b/source/gui/__init__.py
@@ -476,10 +476,10 @@ def __init__(self, frame):
 			# Translators: The label for the menu item to view NVDA Contributors list document.
 			item = menu_help.Append(wx.ID_ANY, _("C&ontributors"))
 			self.Bind(wx.EVT_MENU, lambda evt: os.startfile(getDocFilePath("contributors.txt", False)), item)
-		# Translators: The label for the menu item to open NVDA Welcome Dialog.
-		item = menu_help.Append(wx.ID_ANY, _("We&lcome dialog..."))
-		self.Bind(wx.EVT_MENU, lambda evt: WelcomeDialog.run(), item)
-		menu_help.AppendSeparator()
+			# Translators: The label for the menu item to open NVDA Welcome Dialog.
+			item = menu_help.Append(wx.ID_ANY, _("We&lcome dialog..."))
+			self.Bind(wx.EVT_MENU, lambda evt: WelcomeDialog.run(), item)
+			menu_help.AppendSeparator()
 		if updateCheck:
 			# Translators: The label of a menu item to manually check for an updated version of NVDA.
 			item = menu_help.Append(wx.ID_ANY, _("&Check for update..."))


Test patch:
Repository: nvaccess/nvda

Issue:
Description for Burmese (my) is not recognized in Windows 7
Hi,

Discovered while testing latest changes to language handler: description for Burmese is not picked up in Windows 7.

### Steps to reproduce:
1. On Windows 7, press Control+NVDA+G to open general settings panel.
2. Go through languages list until you arrive at "user default".
3. Press up arrow.

### Actual behavior:
An entry named "my" is shown.

### Expected behavior:
No such entry - Burmese is listed in its proper order.

### System configuration:

#### NVDA Installed/portable/running from source:
Installed

#### NVDA version:
2018.2, beta, and alpha

#### Windows version:
Windows 7 SP1

#### Name and version of other software in use when reproducing the issue:
N/A

#### Other information about your system:
Tested on a virtual machine running Windows 7, as well as on a Windows 8.1 VM and a Windows 10 computer.

### Other questions:

#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA?
Yes

### Technical:
kernel32.dll's LocaleNameToLCID does not recognize Burmese (my) on Windows 7 (returns 0), but is recognized on Windows 8 and later.

Thanks.


Discussion:

Resolving patch:
diff --git a/source/languageHandler.py b/source/languageHandler.py
--- a/source/languageHandler.py
+++ b/source/languageHandler.py
@@ -81,6 +81,8 @@ def getLanguageDescription(language):
 			"ckb":pgettext("languageName","Central Kurdish"),
 			# Translators: The name of a language supported by NVDA.
 			"kmr":pgettext("languageName","Northern Kurdish"),
+			# Translators: The name of a language supported by NVDA.
+			"my":pgettext("languageName","Burmese"),
 		}.get(language,None)
 	return desc
 


Test patch:
Repository: nvaccess/nvda

Issue:
In the properties dialog for a folder, the "not checked" state for the "read-only" attribute is not reported at change
Steps to reproduce it:
1. Open Windows Explorer.
2. Select a folder with some files in it. Maybe some of them should be with a read-only attribute and some - not, but I'm not sure that it is required for reproducing the bug.
3. Press Alt+Enter to invoke the properties dialog for the folder.
4. Move the focus to the check box for changing the read-only attribute.
5. Press space a few times to change its status between checked, half-checked and not checked.

Expected results:
NVDA should report all status changes for the check box.

Actual results:
NVDA stays silent when the state of the check box is changed to "not checked".

Note: In order to reproduce this, the check box in question has to have 3 states: checked, half-checked and not checked. If it has only 2 (checked and not checked), NVDA will report both states as it should.

Test environment:
- Operating system: Windows 10 Pro (build 14393.693), 64-bit, in Bulgarian with all locale settings set to "Bulgarian".
- NVDA version: next-13899,af44c1d4.
- Processor: Intel Core i5-2320 at 3.00GHz.
- RAM Memory: 8.00GB.
- Graphics: Palit GeForce GT 630, 1024MB dedicated memory + 3071MB shared system memory, desktop resolution set to 1920x1080.
- Sound Card: Realtek ALC662 at Intel Cougar Point PCH - High Definition Audio Controller.


Discussion:
Thanks for raising this, and for providing so much information! I can reproduce this with `next-13899,af44c1d4`.

Assuming this is a quick fix, I will assign this a priority 2.


Really quick way to repro this:

1. Open this URL in Firefox: `data:text/html,<div tabindex="0" role="checkbox" aria-checked="mixed" onClick="this.setAttribute('aria-checked', 'false')">Test</div>`
2. Press enter on the check box in browse mode.
 * Expected: "not checked"
 * Actual: Nothing.

Implementation hint: this needs a tweak to `speech.processNegativeStates`. For REASON_CHANGE, if HALFCHECKED is present but CHECKED isn't, we should make sure we add CHECKED to `speakNegatives`.
@feerrenrut This seems prime for a goodForNewDev label, no?
@derekriemer yeah I think so.

Resolving patch:
diff --git a/source/controlTypes.py b/source/controlTypes.py
--- a/source/controlTypes.py
+++ b/source/controlTypes.py
@@ -735,6 +735,9 @@ def processNegativeStates(role, states, reason, negativeStates=None):
 		# Return only those supplied negative states which should be spoken;
 		# i.e. the states in both sets.
 		speakNegatives &= negativeStates
+		# #6946: if HALFCHECKED is present but CHECKED isn't, we should make sure we add CHECKED to speakNegatives.
+		if (STATE_HALFCHECKED in negativeStates and STATE_CHECKED not in states):
+			speakNegatives.add(STATE_CHECKED)
 		if STATES_SORTED & negativeStates and not STATES_SORTED & states:
 			# If the object has just stopped being sorted, just report not sorted.
 			# The user doesn't care how it was sorted before.


Test patch:
Repository: nvaccess/nvda

Issue:
UIA in Word: the document should focus hard left in braille
### Steps to reproduce:
1. Ensure UIA is enabled for Word
2. Open Word
3. Type a single character.

### Expected behavior:
- The character is shown in braille.

### Actual behavior:
- The name of the document object (Document1) already fills the braille display.
- In the case of my 40-cell display, only 2 empty cells remain at the end of the display. When you type the first character, the braille display scrolls and the character is not visible anymore until you scroll back.

### System configuration:
NVDA version:
master-15276,8d463d96

NVDA Installed or portable:
Installed

Other information:
- Just as in Notepad, the document should focus hard left so that the braille display is initially blank and you have to scroll back to see the object name.

Windows version:
10.0.17134

Name and version of other software in use when reproducing the issue:
Word 2016


Discussion:

Resolving patch:
diff --git a/source/braille.py b/source/braille.py
--- a/source/braille.py
+++ b/source/braille.py
@@ -766,8 +766,11 @@ def _isMultiline(self):
 		from treeInterceptorHandler import TreeInterceptor
 		if isinstance(self.obj, TreeInterceptor):
 			return True
-		# Terminals are inherently multiline, so they don't have the multiline state.
-		return (self.obj.role == controlTypes.ROLE_TERMINAL or controlTypes.STATE_MULTILINE in self.obj.states)
+		# Terminals and documents are inherently multiline, so they don't have the multiline state.
+		return (
+			self.obj.role in (controlTypes.ROLE_TERMINAL,controlTypes.ROLE_DOCUMENT)
+			or controlTypes.STATE_MULTILINE in self.obj.states
+		)
 
 	def _getSelection(self):
 		"""Retrieve the selection.


Test patch:
Repository: nvaccess/nvda

Issue:
a mistake on keycode in winUser.py
I found a mistake on keycode in winUser.py
VK_XBUTTON=15
VK_XBUTTON=26
https://github.com/nvaccess/nvda/blob/91831b22f6b20a6b339548186462ae29474c3fbe/source/winUser.py#L145
it should be
VK_XBUTTON1=5
VK_XBUTTON1=6




Discussion:

Resolving patch:
diff --git a/source/winUser.py b/source/winUser.py
--- a/source/winUser.py
+++ b/source/winUser.py
@@ -142,8 +142,8 @@ class GUITHREADINFO(Structure):
 VK_RBUTTON=2
 VK_CANCEL=3
 VK_MBUTTON=4
-VK_XBUTTON=15
-VK_XBUTTON=26
+VK_XBUTTON1=5
+VK_XBUTTON2=6
 VK_BACK=8
 VK_TAB=9
 VK_CLEAR=12


Test patch:
Repository: nvaccess/nvda

Issue:
gui/wxPython 4: if gui.messageBox is called, other NVDA dialogs won't accept keyboard input
Hi,

Reported by a user via Twitter: if a dialog powered by gui.messageBox opens, keyboard input won't be received by other NVDA dialogs.

### Steps to reproduce:
1. Open NVDA's Python Console and type the code shown below.
2. After typing the code, press Enter.
3. Go to a browser window, switch to browse mode, then press Control+NVDA+F to find text.

The code to type from Python Console is:

import gui, wx
gui.messageBox("sometext", "somedialog")

And:

wx.CallAfter(gui.messageBox, "sometext", "somedialog")

### Actual behavior:
Cannot find text in browse mode documents. When Enter key is pressed from find dialog, error sound is heard.

### Expected behavior:
Find dialog works as advertised.

### System configuration:

#### NVDA Installed/portable/running from source:
Installed

#### NVDA version:
Alpha.15693

#### Windows version:
Windows 10 Version 1803 and Insider Preview

#### Name and version of other software in use when reproducing the issue:
None

#### Other information about your system:
None

### Other questions:

#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA?
Yes - 2018.2

### Remarks:

Looks like we need to do something about message box differences between wxPython Classic versus Phoenix.

Thanks.


Discussion:
Hi,

Looks like we need to use wx.Dialog.ShowModal for some standalone dialogs. For now, the pull request for this issue will cover find dialog first.

Thanks.
Hi,

After further testing, here's what I've got so far:

* This problem exists in older NVDA versions as well, so this is not specific to wxPython version.
* If Dialog.ShowModal is used, it causes a problem where oldest instance of a given dialog won't close unless newer instances are closed first. This is seen when opening elements list screen multiple times in succession.

Thanks.

Resolving patch:
diff --git a/source/cursorManager.py b/source/cursorManager.py
--- a/source/cursorManager.py
+++ b/source/cursorManager.py
@@ -203,10 +203,13 @@ def doFindText(self,text,reverse=False,caseSensitive=False):
 		CursorManager._lastCaseSensitivity=caseSensitive
 
 	def script_find(self,gesture):
-		d = FindDialog(gui.mainFrame, self, self._lastCaseSensitivity, self._searchEntries)
-		gui.mainFrame.prePopup()
-		d.Show()
-		gui.mainFrame.postPopup()
+		# #8566: We need this to be a modal dialog, but it mustn't block this script.
+		def run():
+			gui.mainFrame.prePopup()
+			d = FindDialog(gui.mainFrame, self, self._lastCaseSensitivity, self._searchEntries)
+			d.ShowModal()
+			gui.mainFrame.postPopup()
+		wx.CallAfter(run)
 	# Translators: Input help message for NVDA's find command.
 	script_find.__doc__ = _("find a text string from the current cursor position")
 


Test patch:
Repository: nvaccess/nvda

Issue:
Log viewer doesn't display if there's no Dev info for navigator object
### Steps to reproduce:
1. Open this URL in Firefox: `data:text/html,<p></p>`
2. Press NVDA+f1

### Actual behavior:
Log viewer doesn't display and the following error is logged:

> Traceback (most recent call last):  
  > File "scriptHandler.pyc", line 187, in executeScript  
  > File "globalCommands.pyc", line 1450, in script_navigatorObject_devInfo  
> AttributeError: 'NoneType' object has no attribute 'devInfo'  

### Expected behavior:
Log viewer should be display

### System configuration:

#### NVDA Installed/portable/running from source:
Any

#### NVDA version:
alpha-15781,d58e1cd4

#### Windows version:
Any

#### Name and version of other software in use when reproducing the issue:
Any

#### Other information about your system:
None

### Other questions:

#### Does the issue still occur after restarting your PC?
Yes

#### Have you tried any other versions of NVDA?
No


Discussion:

Resolving patch:
diff --git a/source/globalCommands.py b/source/globalCommands.py
--- a/source/globalCommands.py
+++ b/source/globalCommands.py
@@ -1447,7 +1447,10 @@ def script_test_navigatorDisplayModelText(self,gesture):
 
 	def script_navigatorObject_devInfo(self,gesture):
 		obj=api.getNavigatorObject()
-		log.info("Developer info for navigator object:\n%s" % "\n".join(obj.devInfo), activateLogViewer=True)
+		if hasattr(obj, "devInfo"):
+			log.info("Developer info for navigator object:\n%s" % "\n".join(obj.devInfo), activateLogViewer=True)
+		else:
+			log.info("No developer info for navigator object", activateLogViewer=True)
 	# Translators: Input help mode message for developer info for current navigator object command, used by developers to examine technical info on navigator object. This command also serves as a shortcut to open NVDA log viewer.
 	script_navigatorObject_devInfo.__doc__ = _("Logs information about the current navigator object which is useful to developers and activates the log viewer so the information can be examined.")
 	script_navigatorObject_devInfo.category=SCRCAT_TOOLS


Test patch:
Repository: nvaccess/nvda

Issue:
replace 'report balloons' option' with 'report balloons and toast/other notifications'
To my knowledge, help balloons are not used in Windows 8 and later. So, it would be confusing, especially to a new user of Windows, to have this option on in that instance on Windows 8 and later. However, this results in the toasts not being read.  For that, I recommend a change of the option name to reflect this variation.



Discussion:
H, I agree (quite trivial to implement, I’d say a new dev should do it).

From: JamaicanUser [mailto:notifications@github.com] 
Sent: Wednesday, March 2, 2016 12:52 PM
To: nvaccess/nvda nvda@noreply.github.com
Subject: [nvda] replace 'report balloons' option' with 'report balloons and toast/other notifications' (#5789)

To my knowledge, help balloons are not used in Windows 8 and later. So, it would be confusing, especially to a new user of Windows, to have this option on in that instance on Windows 8 and later. However, this results in the toasts not being read. For that, I recommend a change of the option name to reflect this variation.

—
Reply to this email directly or view it on GitHub https://github.com/nvaccess/nvda/issues/5789 .

I think we should possibly just name it "Report notifications" or similar, which covers both. The config option should not be renamed internally, though, so as to avoid breaking backwards compat.

Hi.

Any updates on this ticket. It might be easy to fix, but it hasn't been looked at as yet...

Resolving patch:
diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py
--- a/source/gui/settingsDialogs.py
+++ b/source/gui/settingsDialogs.py
@@ -1464,7 +1464,7 @@ def makeSettings(self, settingsSizer):
 
 		# Translators: This is the label for a checkbox in the
 		# object presentation settings panel.
-		balloonText = _("Report &help balloons")
+		balloonText = _("Report &notifications")
 		self.balloonCheckBox=sHelper.addItem(wx.CheckBox(self,label=balloonText))
 		self.balloonCheckBox.SetValue(config.conf["presentation"]["reportHelpBalloons"])
 


Test patch:
Repository: nvaccess/nvda

Issue:
No longer possible to use OCR add-on in NVDA alpha-15854,a8bda064 due to absence of validate module
### Steps to reproduce:
1. Install OCR ad-don.
2. start NVDA version alpha-15854,a8bda064.
### Actual behavior:
When starting the following is written in the log, and OCR add-on is not working
```
ERROR - globalPluginHandler.listPlugins (10:30:56.907):
Error importing global plugin ocr
Traceback (most recent call last):
  File "globalPluginHandler.pyc", line 22, in listPlugins
  File "C:\Users\Lukasz\AppData\Roaming\nvda\addons\ocr\globalPlugins\ocr\__init__.py", line 18, in <module>
ImportError: No module named validate
```

### Expected behavior:
OCR add-on should work.
### System configuration:

#### NVDA Installed/portable/running from source:
Installed and portable
#### NVDA version:
alpha-15854,a8bda064 
#### Windows version:
Windows 7 x64
#### Name and version of other software in use when reproducing the issue:
OCR add-on
#### Other information about your system:

### Other questions:

#### Does the issue still occur after restarting your PC?
Yes
#### Have you tried any other versions of NVDA?
Yes  NVDA alpha-15851,32351be5 and OCR add-on is working.



Discussion:

Resolving patch:
diff --git a/source/setup.py b/source/setup.py
--- a/source/setup.py
+++ b/source/setup.py
@@ -204,10 +204,17 @@ def getRecursiveDataFiles(dest,source,excludes=()):
 		"excludes": ["Tkinter",
 			"serial.loopback_connection", "serial.rfc2217", "serial.serialcli", "serial.serialjava", "serial.serialposix", "serial.socket_connection"],
 		"packages": ["NVDAObjects","virtualBuffers","appModules","comInterfaces","brailleDisplayDrivers","synthDrivers"],
-		# #3368: bisect was implicitly included with Python 2.7.3, but isn't with 2.7.5.
-		# Also, the service executable used win32api, which some add-ons use for various purposes.
-		# Explicitly include them so we don't break some add-ons.
-		"includes": ["nvdaBuiltin", "bisect", "win32api"],
+		"includes": [
+			"nvdaBuiltin",
+			# #3368: bisect was implicitly included with Python 2.7.3, but isn't with 2.7.5.
+			"bisect",
+			# Also, the previous service executable used win32api, which some add-ons use for various purposes.
+			"win32api",
+			# #8628: include an import module for validate, which older add-ons import directly.
+			# Since configobj 5.1.0, validate is a part of the configobj package
+			# and should be imported as configobj.validate instead
+			"validate",
+		],
 	}},
 	data_files=[
 		(".",glob("*.dll")+glob("*.manifest")+["builtin.dic"]),


Test patch: