diff --git a/addon/globalPlugins/FENCodeReader/__init__.py b/addon/globalPlugins/FENCodeReader/__init__.py index eabbe7d..4115472 100644 --- a/addon/globalPlugins/FENCodeReader/__init__.py +++ b/addon/globalPlugins/FENCodeReader/__init__.py @@ -14,11 +14,13 @@ import config import ui import textInfos +import speech import versionInfo if versionInfo.version_year < 2019: import win32clipboard from time import sleep from threading import Thread +from scriptHandler import script from . import fen from ._gui import * @@ -35,6 +37,8 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin): scriptCategory = "FEN reader" + speechOnDemand = {"speakOnDemand": True} if hasattr(speech.speech.SpeechMode, "onDemand") else {} + def __init__(self, *args, **kwargs): super(GlobalPlugin, self).__init__(*args, **kwargs) if hasattr(settingsDialogs, 'SettingsPanel'): @@ -120,7 +124,8 @@ def describeBoard(self): ui.message(_("Selected text doesn't contains a valid FEN code")) else: ui.message(_("There is not selected text")) - + + @script(**speechOnDemand) def script_describeBoard(self, gesture): self.describeBoard() # Translators: Message presented in input help mode. diff --git a/buildVars.py b/buildVars.py index 23e8a56..43ff846 100644 --- a/buildVars.py +++ b/buildVars.py @@ -19,7 +19,7 @@ # Translators: Long description to be shown for this add-on on add-on information from add-ons manager "addon_description" : _("This addon translates a chess game position from FEN code to human friendly description"), # version - "addon_version" : "2024.0.1", + "addon_version" : "2024.0.2", # Author(s) "addon_author" : u"Javi Dominguez ", # URL for the add-on documentation support @@ -31,7 +31,7 @@ # Last NVDA version supported/tested (e.g. "2018.4", ideally more recent than minimum version) "addon_lastTestedNVDAVersion" : "2024.1.0", # Add-on update channel (default is stable or None) - "addon_updateChannel" : "dev" + "addon_updateChannel" : None } diff --git a/changelog.md b/changelog.md index ecea169..ca2af99 100644 --- a/changelog.md +++ b/changelog.md @@ -1 +1 @@ -* Updated manifest: last tested NVDA version 2023.1 +* Speech on demand feature implemented. \ No newline at end of file