Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove winsound.PlaySound from NVDA #17543

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/NVDAObjects/window/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1804,7 +1804,7 @@ def event_typedCharacter(self, ch):
and controlTypes.State.UNLOCKED not in self.states
and controlTypes.State.PROTECTED in self.parent.states
):
winsound.PlaySound("Default", winsound.SND_ALIAS | winsound.SND_NOWAIT | winsound.SND_ASYNC)
winsound.MessageBeep()
return
super(ExcelCell, self).event_typedCharacter(ch)

Expand Down
2 changes: 1 addition & 1 deletion source/browseMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def _get_shouldTrapNonCommandGestures(self):
return config.conf["virtualBuffers"]["trapNonCommandGestures"]

def script_trapNonCommandGesture(self, gesture):
winsound.PlaySound("default", 1)
winsound.MessageBeep()

singleLetterNavEnabled = True #: Whether single letter navigation scripts should be active (true) or if these letters should fall to the application.

Expand Down
5 changes: 1 addition & 4 deletions source/logHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,7 @@ def emit(self, record):
class FileHandler(logging.FileHandler):
def handle(self, record):
if record.levelno >= logging.CRITICAL:
try:
winsound.PlaySound("SystemHand", winsound.SND_ALIAS | winsound.SND_ASYNC)
except: # noqa: E722
pass
winsound.MessageBeep(winsound.MB_ICONHAND)
elif record.levelno >= logging.ERROR and shouldPlayErrorSound():
getOnErrorSoundRequested().notify()
return super().handle(record)
Expand Down