Skip to content

Commit a3654dc

Browse files
author
Javi Domínguez
committed
Merge branch 'dev'
2 parents 802978d + 59233c2 commit a3654dc

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

addon/globalPlugins/FENCodeReader/__init__.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
import config
1515
import ui
1616
import textInfos
17+
import speech
1718
import versionInfo
1819
if versionInfo.version_year < 2019:
1920
import win32clipboard
2021
from time import sleep
2122
from threading import Thread
23+
from scriptHandler import script
2224
from . import fen
2325
from ._gui import *
2426

@@ -35,6 +37,8 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
3537

3638
scriptCategory = "FEN reader"
3739

40+
speechOnDemand = {"speakOnDemand": True} if hasattr(speech.speech.SpeechMode, "onDemand") else {}
41+
3842
def __init__(self, *args, **kwargs):
3943
super(GlobalPlugin, self).__init__(*args, **kwargs)
4044
if hasattr(settingsDialogs, 'SettingsPanel'):
@@ -86,7 +90,7 @@ def describeBoard(self):
8690
timeForSearching = Thread(target=sleep, args=(0.3,))
8791
timeForSearching.start()
8892
while not description and c < l-16:
89-
if not timeForSearching.isAlive():
93+
if not timeForSearching.is_alive():
9094
ui.message(_("Too much text has been selected"))
9195
return
9296
# First use english notation by default
@@ -120,7 +124,8 @@ def describeBoard(self):
120124
ui.message(_("Selected text doesn't contains a valid FEN code"))
121125
else:
122126
ui.message(_("There is not selected text"))
123-
127+
128+
@script(**speechOnDemand)
124129
def script_describeBoard(self, gesture):
125130
self.describeBoard()
126131
# Translators: Message presented in input help mode.

buildVars.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
2020
"addon_description" : _("This addon translates a chess game position from FEN code to human friendly description"),
2121
# version
22-
"addon_version" : "2023.1.0",
22+
"addon_version" : "2024.1.0",
2323
# Author(s)
2424
"addon_author" : u"Javi Dominguez <[email protected]>",
2525
# URL for the add-on documentation support
@@ -29,9 +29,9 @@
2929
# Minimum NVDA version supported (e.g. "2018.3")
3030
"addon_minimumNVDAVersion" : "2019.3.0",
3131
# Last NVDA version supported/tested (e.g. "2018.4", ideally more recent than minimum version)
32-
"addon_lastTestedNVDAVersion" : "2023.3.0",
32+
"addon_lastTestedNVDAVersion" : "2024.1.0",
3333
# Add-on update channel (default is stable or None)
34-
"addon_updateChannel" : "stable"
34+
"addon_updateChannel" : None
3535
}
3636

3737

changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* Updated manifest: last tested NVDA version 2023.1
1+
* Speech on demand feature implemented.

0 commit comments

Comments
 (0)