Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
b6faf91
Depend on the correct moFile for a given md file.
Jun 17, 2023
340d82d
fix up merge conflicts.
Nov 19, 2024
b8eba97
Merge pull request #31 from derekriemer/lang_fixup
josephsl Nov 20, 2024
3b22bfa
SConstruct: reformat via Ruff
josephsl Nov 20, 2024
4e80d7b
The meta elements in the generated HTML are on separate lines.
hwf1324 Jan 2, 2025
bbf3c2e
Merge pull request #54 from hwf1324/fixGenerateHTML
josephsl Jan 2, 2025
5584c62
Readme and SConstruct: update copyright years, update dependency vers…
josephsl Jan 2, 2025
ac411c4
Add-on template: remove template-based NV Access add-on store json fi…
josephsl Jan 2, 2025
3e124a4
Enable write permission when creating releases
tspivey Feb 3, 2025
bf259d0
Merge pull request #55 from tspivey/releasePermissions
josephsl Feb 7, 2025
c0aa5a6
BuildVars: add-ons manager -> add-on store, clarify that summary can …
josephsl Feb 26, 2025
cb03ab8
BuildVars: update minimum and last tesed version examples based on ad…
josephsl Feb 26, 2025
eb4f643
BuildVars, readme, sconstruct: remove extraneous whitespace
josephsl Mar 13, 2025
ba7c657
Pyproject: add Pyright support.
josephsl Jun 22, 2025
fd73176
Readme: mention Pyright
josephsl Jun 22, 2025
72a2c14
buildVars: move down dont_write_bytecode after comment
balaraz Jul 17, 2025
21abd0e
SConstruct: add matchesNoPatterns function
balaraz Jul 17, 2025
a0244e8
SConstruct: The function X is rewritten
balaraz Jul 17, 2025
935ef8d
buildVars: Extend comment before excludedFiles
balaraz Jul 17, 2025
c84a6c1
Merge pull request #59 from balaraz/master
josephsl Jul 17, 2025
99722d6
SConstruct: Refactor md2html func
balaraz Jul 21, 2025
b982d4d
SConstruct: Refactor createAddonHelp func
balaraz Jul 21, 2025
e8e4a27
SConstruct: Fix typo in name machesNoPaterns
balaraz Jul 21, 2025
8ca6146
SConstruct: Refactor validateVersionNumber
balaraz Jul 22, 2025
31a57c3
SConstruct: Refactor if env["dev"] section
balaraz Jul 22, 2025
4b2d2ac
SConstruct: Refactor matchesNoPatterns
balaraz Jul 23, 2025
12cc3af
SConstruct: Update expandGlobs func
balaraz Jul 24, 2025
8b1b954
SConstruct: Removed unnecessary os.path.join
balaraz Jul 27, 2025
5b1ba4b
SConstruct: Migrated to pathlib.Path from os.path
balaraz Jul 27, 2025
df6abb9
SConstruct: Replaced literal "addon" with const addonDir
balaraz Jul 27, 2025
9b52fc4
SConstruct: Moved down a definition of addonFile
balaraz Jul 27, 2025
2c49e6c
SConstruct: Rewrote iteration over markdown doc files
balaraz Jul 27, 2025
dea8dbf
SConstruct: Updated createAddonHelp func
balaraz Jul 27, 2025
1a25925
SConstruct: Rewrote definition of localeDirs list
balaraz Jul 27, 2025
bbe7b16
SConstruct: Added explicit imports for linter compatibility
balaraz Jul 27, 2025
dddf7af
SConstruct: Added type hints from SCons.Node.FS
balaraz Jul 27, 2025
0151f4f
buildVars: Added type hints for _ function
balaraz Jul 27, 2025
917d540
buildVars: Added type hints to variables
balaraz Jul 27, 2025
30ae096
buildVars: Added AddonInfo typed dict
balaraz Jul 27, 2025
2577e43
SConstruct: Fixed build in Linux environment
balaraz Jul 27, 2025
0f434d4
SConstruct: Extend commit bbe7b16
balaraz Jul 28, 2025
97ed6d1
SConstruct: Improved type hints
balaraz Jul 28, 2025
28459b8
SConstruct: Updated expandGlobs function
balaraz Jul 28, 2025
e9efd87
SConstruct: Updated mdTool
balaraz Jul 28, 2025
ec44944
SConstruct, mdTool: Moved mdTool & md2html to site_tools
balaraz Jul 28, 2025
53363bf
mdTool: Fixed mdAction lambda funcs
balaraz Jul 28, 2025
a34ce1f
SConstruct: Returned env.Glob instead of Path.glob
balaraz Jul 29, 2025
20ff630
buildVars, SConstruct: Added type hints to non typed vars
balaraz Jul 29, 2025
0071a85
SConstruct:Refactored if getattr calls
balaraz Jul 29, 2025
76b7120
SConstruct: Added format_nested_section func
balaraz Jul 29, 2025
7bbf1af
SConstruct: Update generateManifest
balaraz Jul 29, 2025
21b2733
SConstruct: Refactored generateTranslatedManifest
balaraz Jul 29, 2025
a25f882
mdTool, SConstruct: Renamed markdown builder to md2html
balaraz Jul 29, 2025
9526341
SConstruct: Removed createAddonHelp func
balaraz Jul 29, 2025
a206862
SConstruct: Refactored script
balaraz Jul 30, 2025
16b0d3b
SConstruct: Update addonGenerator
balaraz Jul 30, 2025
857867b
SConstruct: Update manifestGenerator
balaraz Jul 30, 2025
6d85c81
SConstruct: Update addonTool
balaraz Jul 30, 2025
7fbfbd7
SConstruct, NVDATool: Created NVDATool
balaraz Jul 30, 2025
fced694
buildVars, NVDATool: Moved AddonInfo class to NVDATool
balaraz Jul 30, 2025
958a157
buildVars, NVDATool: Update brl tabs & sym dicts type hints
balaraz Jul 30, 2025
c769cac
SConstruct: Fixed import Mapping
balaraz Jul 30, 2025
b5ed0ed
NVDATool: Added Strable protocol
balaraz Jul 30, 2025
ea7d99d
SConstruct: Updated functions signatures, used Strable
balaraz Jul 30, 2025
7ef5669
SConstruct: Updated generateManifest
balaraz Jul 30, 2025
ae3af0d
SConstruct: Updated generateTranslatedManifest
balaraz Jul 30, 2025
57e9081
SConstruct, NVDATool: Moved manifest generators to NVDATool
balaraz Jul 31, 2025
d7545ba
SConstruct, NVDATool: Updated translatedManifestGenrator
balaraz Jul 31, 2025
d5e3462
NVDATOOl: Removed translatedManifestGenerator
balaraz Jul 31, 2025
0f4c508
NVDATool: Remove typing.override from typings.py
balaraz Jul 31, 2025
bc09b71
SConstruct: Removed unneeded update buildVars.addon_info
balaraz Jul 31, 2025
e7e900f
SConstruct, mdTool, NVDATool: Removed mdTool
balaraz Aug 2, 2025
1a0968d
NVDATool: Updated md2html
balaraz Aug 2, 2025
9334189
buildVars, NVDATool: Moved _ func to NVDATool.utils
balaraz Aug 2, 2025
f3347a0
NVDATool: Refactored import typings in NVDATool.manifests
balaraz Aug 2, 2025
68e292e
NVDATool: Moved format_nested_section func to utils.py
balaraz Aug 2, 2025
3420405
NVDATool: Update format_nested_section util
balaraz Aug 2, 2025
b989853
NVDATool: Refactored generateTranslatedManifest
balaraz Aug 2, 2025
b6c38da
NVDATool: Update md2html func
balaraz Aug 2, 2025
307361c
SConstruct: Fixed moFile binding to mdFile
balaraz Aug 2, 2025
604778e
SConstruct, NVDATool: Updated md2html
balaraz Aug 2, 2025
57d14fc
buildVars: Refactored definition of addon_info
balaraz Aug 3, 2025
3ccc1eb
NVDATool.md2html: Fixed title definition
balaraz Aug 3, 2025
1eef48a
NVDATool: Refactored md2html func
balaraz Aug 5, 2025
6919905
SConstruct: Fixed applying addon_info
balaraz Aug 5, 2025
7fc4ed2
Merge pull request #61 from balaraz/modernize
josephsl Aug 5, 2025
d069b54
SConstruct, NVDA tool: remove unused imports
josephsl Aug 5, 2025
7dba876
Site tools: spacing around 'or' operator, mention pathlib.Path
josephsl Aug 5, 2025
77abd3b
Readme: updates including dependencies and removal of versionNumber C…
josephsl Aug 5, 2025
6c023a4
BuildVars: add 'changelog' manifest key to record latest changes for …
josephsl Aug 11, 2025
2c2166d
Manifest template: add 'chagelog' key
josephsl Aug 11, 2025
1846beb
Manifest template: add 'changelog' to translatable manifest template
josephsl Aug 11, 2025
75df0dc
Bump actions/download-artifact from 4 to 5
dependabot[bot] Aug 12, 2025
3c3bc83
Merge pull request #62 from nvdaaddons/dependabot/github_actions/acti…
josephsl Aug 12, 2025
bfe944a
Bump actions/checkout from 4 to 5
dependabot[bot] Aug 12, 2025
94c6cc1
Merge pull request #63 from nvdaaddons/dependabot/github_actions/acti…
josephsl Aug 12, 2025
b5c38cb
Readme: document 'changelog' manifest key
josephsl Aug 12, 2025
2abc1de
Site_scons.NVDA tool: add type hint for add-on changelog key and decl…
josephsl Aug 18, 2025
1cf8b8c
Delete fixed paths in upload jobs
hwf1324 Aug 19, 2025
a001914
Merge pull request #66 from hwf1324/fixRelease
josephsl Aug 19, 2025
2b9bf7b
Manifest: triple quote add-on changelog data
josephsl Aug 29, 2025
29d9506
NVDATool.docs - md2html: Fix encoding bug - Encoding still needs to b…
Sep 2, 2025
723da29
Merge pull request #68 from CyrilleB79/encodingFix
josephsl Sep 2, 2025
fa4745e
Bump actions/setup-python from 5 to 6
dependabot[bot] Sep 8, 2025
ca99a76
Merge pull request #69 from nvdaaddons/dependabot/github_actions/acti…
josephsl Sep 15, 2025
f6fdfc1
Template readme: Python 3.11 -> 3.1 64-bit
josephsl Oct 18, 2025
d3f2ea6
Bump actions/download-artifact from 5 to 6
dependabot[bot] Oct 27, 2025
8bc7e4a
Bump actions/upload-artifact from 4 to 5
dependabot[bot] Oct 27, 2025
ced2e26
Merge pull request #71 from nvdaaddons/dependabot/github_actions/acti…
josephsl Nov 7, 2025
1c0a417
Merge pull request #72 from nvdaaddons/dependabot/github_actions/acti…
josephsl Nov 7, 2025
c81ad0e
Readme: SCons and Markdown dependency version updates, retire Appveyo…
josephsl Nov 11, 2025
8e0f88e
Bump actions/checkout from 5 to 6 (#3)
CyrilleB79 Nov 28, 2025
00c6b31
Update precommit configuration (#4)
nvdaes Dec 16, 2025
0273641
Update pyproject (#5)
nvdaes Dec 29, 2025
3ec67ac
Fix branch args (#9)
nvdaes Dec 30, 2025
c890dd0
fixRuffInPyProject (#8)
nvdaes Dec 30, 2025
ce86935
Fixes using pre-commit (#10)
nvdaes Dec 30, 2025
7b7b8b1
Add a note encouraging to use pre-commit.ci (#11)
nvdaes Dec 30, 2025
c6f50e9
Bump actions/download-artifact from 6 to 7 and bump actions/upload-ar…
CyrilleB79 Jan 8, 2026
a4f9291
Bump actions/download-artifact from 7 to 8 (#17)
dependabot[bot] Feb 26, 2026
20c3919
Bump actions/upload-artifact from 6 to 7 (#16)
dependabot[bot] Feb 26, 2026
945487a
Bump the uv group across 1 directory with 3 updates (#18)
dependabot[bot] Feb 26, 2026
3ac4b6f
Add-on template: add support for custom speech pronunciation dictiona…
josephsl Mar 2, 2026
bda47e6
BuildVars: add missing SpeechDictionaries import (#20)
josephsl Mar 3, 2026
3ab0021
Run workflow just when files are changed in the addon folder (#21)
nvdaes Mar 3, 2026
6093c55
Do not restrict workflow triggers to addon path (#22)
CyrilleB79 Mar 4, 2026
e0585fd
Fixes for CI workflow (#23)
CyrilleB79 Mar 17, 2026
867f183
Workflow runs produce add-on and .pot artifacts instead of a .zip (#24)
CyrilleB79 Mar 19, 2026
eef379d
Bump requests from 2.32.5 to 2.33.0 in the uv group across 1 director…
dependabot[bot] Mar 30, 2026
b4c72dd
Bump uv from 0.9.11 to 0.11.6 in the uv group across 1 directory (#26)
dependabot[bot] Apr 16, 2026
dab00d5
Bump softprops/action-gh-release from 2 to 3 (#27)
dependabot[bot] Apr 16, 2026
b6443de
Bump lxml from 6.0.2 to 6.1.0 in the uv group across 1 directory (#29)
dependabot[bot] Apr 21, 2026
f358400
Merge upstream AddonTemplate
cary-rowen Apr 29, 2026
1b894af
Merge origin/master into template sync
cary-rowen Apr 30, 2026
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
42 changes: 25 additions & 17 deletions .github/workflows/build_addon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,44 @@ on:

jobs:
build:
# Building the add-on template as an add-on does not make sense (and fails).
# Do not modify this repo name with your own one! (should remain the template)
if: github.repository != 'nvaccess/addonTemplate'

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt

- name: Set up Python
uses: actions/setup-python@v6
- name: Checkout repo
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: 3.11
cache: 'pip'

enable-cache: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt
sudo apt-get update -y
sudo apt-get install -y gettext
uv sync

- name: Code checks
run: export SKIP=no-commit-to-branch; pre-commit run --all
run: export SKIP=no-commit-to-branch,pyright; uv run pre-commit run --all-files

- name: building addon
run: scons && scons pot
run: uv run scons && uv run scons pot

- uses: actions/upload-artifact@v7
with:
name: packaged_addon
path: |
./*.nvda-addon
archive: false

- uses: actions/upload-artifact@v7
with:
name: translation_template
path: |
./*.pot
archive: false

upload_release:
runs-on: ubuntu-latest
Expand All @@ -55,21 +60,24 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v6
- name: download releases files
- name: download all artifacts
uses: actions/download-artifact@v8
with:
path: .
merge-multiple: true
- name: Display structure of downloaded files
run: ls -R
- name: Calculate sha256
run: |
echo -e "\nSHA256: " >> changelog.md
sha256sum packaged_addon/*.nvda-addon >> changelog.md
sha256sum *.nvda-addon >> changelog.md

- name: Release
uses: softprops/action-gh-release@v3
with:
files: |
packaged_addon/*.nvda-addon
packaged_addon/*.pot
*.nvda-addon
*.pot
body_path: changelog.md
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ manifest.ini
*.nvda-addon
.sconsign.dblite
/[0-9]*.[0-9]*.[0-9]*.json
*.egg-info
92 changes: 86 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,87 @@
# Copied from https://github.com/nvaccess/nvda
# https://pre-commit.ci/
# Configuration for Continuous Integration service
ci:
# Pyright does not seem to work in pre-commit CI
skip: [pyright]
autoupdate_schedule: monthly
autoupdate_commit_msg: "Pre-commit auto-update"
autofix_commit_msg: "Pre-commit auto-fix"
submodules: true

default_language_version:
python: python3.13

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-yaml
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config

- repo: meta
hooks:
# ensures that exclude directives apply to any file in the repository.
- id: check-useless-excludes
# ensures that the configured hooks apply to at least one file in the repository.
- id: check-hooks-apply

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Prevents commits to certain branches
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "master", ]
# Checks that large files have not been added. Default cut-off for "large" files is 500kb.
- id: check-added-large-files
# Checks python syntax
- id: check-ast
# Checks for filenames that will conflict on case insensitive filesystems (the majority of Windows filesystems, most of the time)
- id: check-case-conflict
# Checks for artifacts from resolving merge conflicts.
- id: check-merge-conflict
# Checks Python files for debug statements, such as python's breakpoint function, or those inserted by some IDEs.
- id: debug-statements
# Removes trailing whitespace.
- id: trailing-whitespace
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Ensures all files end in 1 (and only 1) newline.
- id: end-of-file-fixer
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Removes the UTF-8 BOM from files that have it.
# See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
- id: fix-byte-order-marker
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Validates TOML files.
- id: check-toml
# Validates YAML files.
- id: check-yaml
# Ensures that links to lines in files under version control point to a particular commit.
- id: check-vcs-permalinks
# Avoids using reserved Windows filenames.
- id: check-illegal-windows-names
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.2.0
hooks:
# Ruff preserves indent/new-line formatting of function arguments, list items, and similar iterables,
# if a trailing comma is added.
# This adds a trailing comma to args/iterable items in case it was missed.
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
# Matches Ruff version in pyproject.
rev: v0.12.7
hooks:
- id: ruff
name: lint with ruff
args: [ --fix ]
- id: ruff-format
name: format with ruff

- repo: local
hooks:

- id: pyright
name: type check with pyright
entry: uv run pyright
language: system
types: [python]
8 changes: 2 additions & 6 deletions .vscode/typings/__builtins__.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
def _(msg: str) -> str:
...


def pgettext(context: str, message: str) -> str:
...
def _(msg: str) -> str: ...
def pgettext(context: str, message: str) -> str: ...
2 changes: 1 addition & 1 deletion addon/doc/ar/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
- تم تقديم فاصل زمني قابل للتكوين لمراقبة الكائنات.

[GitHub]: https://github.com/cary-rowen/objWatcher
[GitHubIssue]: https://github.com/cary-rowen/objWatcher/issues
[GitHubIssue]: https://github.com/cary-rowen/objWatcher/issues
1 change: 0 additions & 1 deletion addon/doc/es/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ de observar.

[GitHub]: https://github.com/cary-rowen/objWatcher [GitHubIssue]:
https://github.com/cary-rowen/objWatcher/issues

1 change: 0 additions & 1 deletion addon/doc/fi/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ ilmoitetaan. Lopeta tarkkailu painamalla kahdesti.

[GitHub]: https://github.com/cary-rowen/objWatcher [GitHubIssue]:
https://github.com/cary-rowen/objWatcher/issues

1 change: 0 additions & 1 deletion addon/doc/fr/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,3 @@ arrêter la surveillance.

[GitHub]: https://github.com/cary-rowen/objWatcher [GitHubIssue]:
https://github.com/cary-rowen/objWatcher/issues

1 change: 0 additions & 1 deletion addon/doc/pt_BR/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ interromper a observação.

[GitHub]: https://github.com/cary-rowen/objWatcher [GitHubIssue]:
https://github.com/cary-rowen/objWatcher/issues

1 change: 0 additions & 1 deletion addon/doc/ru/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@

[GitHub]: https://github.com/cary-rowen/objWatcher [GitHubIssue]:
https://github.com/cary-rowen/objWatcher/issues

1 change: 0 additions & 1 deletion addon/doc/tr/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,3 @@ raporlanacaktır. İzlemeyi durdurmak için iki kez basın.

[GitHub]: https://github.com/cary-rowen/objWatcher [GitHubIssue]:
https://github.com/cary-rowen/objWatcher/issues

10 changes: 5 additions & 5 deletions addon/doc/zh_CN/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

1. **字幕与歌词监视:**
监视某些播放器的字幕或歌词对象,内容刷新时可以自动读出。
2. **聊天活动监视:**
监视 Unigram 或微信的会话列表中感兴趣的会话。有新消息时可自动读出,支持后台朗读。
3. **测试与调试:**
2. **聊天活动监视:**
监视 Unigram 或微信的会话列表中感兴趣的会话。有新消息时可自动读出,支持后台朗读。
3. **测试与调试:**
监视记事本的状态栏,以在内容插入/删除过程中自动读出行/列变化。

## 按键与手势
Expand Down Expand Up @@ -50,12 +50,12 @@

## 贡献者

- **作者:**
- **作者:**
- Cary-rowen: 核心开发者
- hwf1324: 代码贡献者
- Ibrahim Hamadeh: 代码贡献者

- **本地化贡献者:**
- **本地化贡献者:**
- Ibrahim Hamadeh: 阿拉伯语翻译
- VovaMobile: 乌克兰语翻译

Expand Down
20 changes: 11 additions & 9 deletions addon/globalPlugins/objWatcher/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def script_HandleNumberKey(self, gesture):
log.warning(f"Invalid key detected: '{invalid_key}'.")
# Translators: Message to the user when an invalid gesture is detected
ui.message(
_("Invalid key: '{}'. Please use a numeric key like NVDA+Alt+0~9.").format(invalid_key)
_("Invalid key: '{}'. Please use a numeric key like NVDA+Alt+0~9.").format(invalid_key),
)
return

Expand All @@ -158,12 +158,13 @@ def script_HandleNumberKey(self, gesture):
if data["name"] == (data["lastText"] or self._getWatchingAttribute(data["obj"]))
# If name and lastText are different, report both name and lastText
else "{} - {}".format(
data["name"], data["lastText"] or self._getWatchingAttribute(data["obj"])
data["name"],
data["lastText"] or self._getWatchingAttribute(data["obj"]),
)
if data["name"]
# If name is empty, only report lastText or fallback to _getWatchingAttribute
else data["lastText"] or self._getWatchingAttribute(data["obj"]),
)
),
)
return

Expand Down Expand Up @@ -192,7 +193,7 @@ def script_HandleNumberKey(self, gesture):
"name": obj.name or _("Unnamed object"),
"addTime": time.time(),
"number": number,
}
},
)

# Start the timer if not paused and not already running
Expand All @@ -203,8 +204,9 @@ def script_HandleNumberKey(self, gesture):
# Translators: Message when an object is added to the watch list and watching not started
ui.message(
_("Added object to position {}: {}, Watching has not started.").format(
number, self.watchingObjs[-1]["name"]
)
number,
self.watchingObjs[-1]["name"],
),
)
cues.Start()
self.finish() # Exit layer mode after adding the object
Expand All @@ -225,7 +227,7 @@ def _getMultiPressTimeout(self):
@script(
# Translators: Presented in input help mode.
description=_(
"Press once to delete the last watched object; press twice to delete all watched objects"
"Press once to delete the last watched object; press twice to delete all watched objects",
),
)
def script_DeleteLastChecked(self, gesture):
Expand Down Expand Up @@ -300,7 +302,7 @@ def onTimerEvent(self, event):
self.watchingObjs.remove(data)
# Translators: Message when an object is no longer available and has been removed
ui.message(
_("{} is no longer available and has been removed from watch list").format(name)
_("{} is no longer available and has been removed from watch list").format(name),
)
continue

Expand Down Expand Up @@ -375,7 +377,7 @@ def script_ToggleWindow(self, gesture):
"name": obj.name or _("Unnamed window"),
"addTime": time.time(),
"number": None, # Special objects do not use number positions
}
},
)

# Start the timer if not paused and not already running
Expand Down
2 changes: 1 addition & 1 deletion addon/globalPlugins/objWatcher/cues.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ def NoObj():


def play_sound(filename):
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'sounds', filename))
path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "sounds", filename))
return playWaveFile(path + ".wav")
5 changes: 3 additions & 2 deletions addon/globalPlugins/objWatcher/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ def makeSettings(self, settingsSizer):
self.intervalEdit = settingsSizerHelper.addLabeledControl(
intervalLabelText,
nvdaControls.SelectOnFocusSpinCtrl,
min=10, max=500,
initial=int(config.conf["objWatcher"]["interval"])
min=10,
max=500,
initial=int(config.conf["objWatcher"]["interval"]),
)

def onSave(self):
Expand Down
Loading