From e766814d594a499828803252d8ec8b0d9ae23f0f Mon Sep 17 00:00:00 2001 From: Pierre-Louis R Date: Tue, 23 Jul 2024 09:57:33 +0200 Subject: [PATCH] V2407.24 : for TB 115 --- 2404.12.0.json | 2 +- 2404.17.0.json | 29 + 2404.20.0.json | 29 + 2404.22.0.json | 29 + 2404.23.0.json | 29 + 2404.29.0.json | 29 + 2405.1.0.json | 29 + 2405.10.0.json | 29 + 2405.21.0.json | 29 + 2405.22.0.json | 29 + 2405.6.0.json | 29 + 2405.7.0.json | 29 + 2406.1.0.json | 29 + 2406.20.0.json | 29 + 2406.21.0.json | 29 + 2406.22.0.json | 29 + 2406.26.0.json | 29 + 2406.4.0.json | 29 + 2406.9.0.json | 29 + 2407.10.0.json | 29 + 2407.11.0.json | 29 + 2407.13.0.json | 29 + 2407.18.0.json | 29 + 2407.24.0.json | 29 + .../messengerWindow/folderTreeItem.py | 17 +- .../messengerWindow/messageListItem.py | 39 +- .../messengerWindow/tabAddressBook.py | 4 +- addon/appModules/messengerWindow/tabs.py | 26 +- .../msgComposeWindow/msgComposeWindow.py | 15 +- .../msgComposeWindow/spellCheckDlg.py | 8 +- addon/appModules/shared/checkListMenu.py | 79 ++ addon/appModules/shared/menuSettings.py | 322 ++--- addon/appModules/shared/quoteNav.py | 168 +-- addon/appModules/shared/sharedVars.py | 50 +- addon/appModules/shared/startupDlg.py | 91 ++ addon/appModules/shared/textDialog.py | 136 +++ addon/appModules/shared/utils115.py | 305 ++++- addon/appModules/shared/utis.py | 32 +- addon/appModules/thunderbird.py | 514 ++++---- addon/doc/en/readme.md | 12 +- addon/doc/fr/readme.md | 9 +- addon/doc/tr/readme.md | 382 ++++++ addon/globalPlugins/ThunderbirdGlob.py | 1 - addon/globalPlugins/shared/notif.py | 12 +- addon/globalPlugins/shared/updateLite.py | 8 + addon/installTasks.py | 13 +- addon/locale/cs/LC_MESSAGES/nvda.po | 666 ++++++----- addon/locale/da/LC_MESSAGES/nvda.po | 555 +++++---- addon/locale/es/LC_MESSAGES/nvda.po | 681 ++++++----- addon/locale/fr/LC_MESSAGES/nvda.po | 642 ++++++---- addon/locale/it/LC_MESSAGES/nvda.po | 672 ++++++----- addon/locale/pt/LC_MESSAGES/nvda.po | 1031 ++++++++--------- addon/locale/tr/LC_MESSAGES/nvda.po | 866 ++++++++------ addon/locale/uk/LC_MESSAGES/nvda.po | 668 ++++++----- buildVars.py | 4 +- doc-en/readme.md | 12 +- readme.md | 12 +- 57 files changed, 5718 insertions(+), 3003 deletions(-) create mode 100644 2404.17.0.json create mode 100644 2404.20.0.json create mode 100644 2404.22.0.json create mode 100644 2404.23.0.json create mode 100644 2404.29.0.json create mode 100644 2405.1.0.json create mode 100644 2405.10.0.json create mode 100644 2405.21.0.json create mode 100644 2405.22.0.json create mode 100644 2405.6.0.json create mode 100644 2405.7.0.json create mode 100644 2406.1.0.json create mode 100644 2406.20.0.json create mode 100644 2406.21.0.json create mode 100644 2406.22.0.json create mode 100644 2406.26.0.json create mode 100644 2406.4.0.json create mode 100644 2406.9.0.json create mode 100644 2407.10.0.json create mode 100644 2407.11.0.json create mode 100644 2407.13.0.json create mode 100644 2407.18.0.json create mode 100644 2407.24.0.json create mode 100644 addon/appModules/shared/checkListMenu.py create mode 100644 addon/appModules/shared/startupDlg.py create mode 100644 addon/appModules/shared/textDialog.py create mode 100644 addon/doc/tr/readme.md diff --git a/2404.12.0.json b/2404.12.0.json index 20785ed..03302db 100644 --- a/2404.12.0.json +++ b/2404.12.0.json @@ -3,7 +3,7 @@ "displayName": "Thunderbird+G5 (TB >= 115)\u0003", "URL": "", "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", - "sha256": "a2784bdff799e019c9f3f4e5e1607ded3120824ddf179569eb237c95c8556216", + "sha256": "e7bd1628786e34a5c393eee49b5ec1013d6fd4cc955b8574e12b5950f5ec0c42", "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", "addonVersionName": "2404.12.00", "addonVersionNumber": { diff --git a/2404.17.0.json b/2404.17.0.json new file mode 100644 index 0000000..a6c8280 --- /dev/null +++ b/2404.17.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "e940c13cb8f072bda4b7f3b4bb78d9d2bfd685f2bfbbd967a21c689024459502", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2404.17.00", + "addonVersionNumber": { + "major": 2404, + "minor": 17, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2404.20.0.json b/2404.20.0.json new file mode 100644 index 0000000..e5ef9ab --- /dev/null +++ b/2404.20.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "787d56e31d6f0fa0574405d3a151a84b276edf97786c409bf0d45d5eea578d76", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2404.20.00", + "addonVersionNumber": { + "major": 2404, + "minor": 20, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2404.22.0.json b/2404.22.0.json new file mode 100644 index 0000000..187df45 --- /dev/null +++ b/2404.22.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "c018c48b144b258e4d1ecdad1dfe05bffc7281069e44a39990483a127b9ec86f", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2404.22.00", + "addonVersionNumber": { + "major": 2404, + "minor": 22, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2404.23.0.json b/2404.23.0.json new file mode 100644 index 0000000..9bac3ff --- /dev/null +++ b/2404.23.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "74de43c7e6114169f89b6446b8aa2317653ff6e06862a990a000d5e6ff7adae0", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2404.23.00", + "addonVersionNumber": { + "major": 2404, + "minor": 23, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2404.29.0.json b/2404.29.0.json new file mode 100644 index 0000000..2699139 --- /dev/null +++ b/2404.29.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "cf926070691833d5333671ca986ad132e2f11adb52f3756a7a448caf9dd89d10", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2404.29.00", + "addonVersionNumber": { + "major": 2404, + "minor": 29, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2405.1.0.json b/2405.1.0.json new file mode 100644 index 0000000..9c8a7f2 --- /dev/null +++ b/2405.1.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "0ab239fca4c96f8730ddcaf1fef29e2b19f468e14513a530459eefe3afdbb8e3", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2405.01.00", + "addonVersionNumber": { + "major": 2405, + "minor": 1, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2405.10.0.json b/2405.10.0.json new file mode 100644 index 0000000..089ce96 --- /dev/null +++ b/2405.10.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "ce716f8c992b16d494bb1987dfcf47fdfe14e9004267297ec00bc35264c1c584", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2405.10.00", + "addonVersionNumber": { + "major": 2405, + "minor": 10, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2405.21.0.json b/2405.21.0.json new file mode 100644 index 0000000..e3b62fe --- /dev/null +++ b/2405.21.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "2cc1c10b6efe32d00a9d5725c5601227cb517b19c5eabb423392dca51477aabb", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2405.21.00", + "addonVersionNumber": { + "major": 2405, + "minor": 21, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2405.22.0.json b/2405.22.0.json new file mode 100644 index 0000000..ff5822f --- /dev/null +++ b/2405.22.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "e25c8fd82f34e70e77df27b9e367fd39e0c8bef327b143aca9d5072600468d2b", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2405.22.00", + "addonVersionNumber": { + "major": 2405, + "minor": 22, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2405.6.0.json b/2405.6.0.json new file mode 100644 index 0000000..68d276d --- /dev/null +++ b/2405.6.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "e8fb9380db0ea02e96900d896ac352d0afc0d9ff2078417d7c9b2fe3ebd07c9a", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2405.06.00", + "addonVersionNumber": { + "major": 2405, + "minor": 6, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2405.7.0.json b/2405.7.0.json new file mode 100644 index 0000000..ca41e18 --- /dev/null +++ b/2405.7.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "ac5d4bfd90d71bdd98248337304992dfb843b2b62c92b02a78326b30737a0552", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2405.07.00", + "addonVersionNumber": { + "major": 2405, + "minor": 7, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2406.1.0.json b/2406.1.0.json new file mode 100644 index 0000000..57917ef --- /dev/null +++ b/2406.1.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "9470e0b9bf682cdf3bb2dea899a9a40a5a76b723abbd603ecec90cf8aca2fb40", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2406.01.00", + "addonVersionNumber": { + "major": 2406, + "minor": 1, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2406.20.0.json b/2406.20.0.json new file mode 100644 index 0000000..394a707 --- /dev/null +++ b/2406.20.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "440fa43a86fa7fe24beb20a07bdeeddeb3da0fae643717321b73bdd56229283b", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2406.20.00", + "addonVersionNumber": { + "major": 2406, + "minor": 20, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2406.21.0.json b/2406.21.0.json new file mode 100644 index 0000000..558d9d4 --- /dev/null +++ b/2406.21.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "4096d27a2fe129d0177c69393a85648038c766263f2f5e73afcec72129562005", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2406.21.00", + "addonVersionNumber": { + "major": 2406, + "minor": 21, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2406.22.0.json b/2406.22.0.json new file mode 100644 index 0000000..af413da --- /dev/null +++ b/2406.22.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "54a8e13c7853db3a53b706bfe56e2f7f47881caac0366baf95e725480bc5bbd3", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2406.22.00", + "addonVersionNumber": { + "major": 2406, + "minor": 22, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2406.26.0.json b/2406.26.0.json new file mode 100644 index 0000000..36a6cb6 --- /dev/null +++ b/2406.26.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "0a790d4c73b99c425d90b8a478baf4725fa3604bb6cbe96b8a188e64a95f392c", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2406.26.00", + "addonVersionNumber": { + "major": 2406, + "minor": 26, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2406.4.0.json b/2406.4.0.json new file mode 100644 index 0000000..eabe7c7 --- /dev/null +++ b/2406.4.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "ca035489cc94104b003d8b0a6bfa6404e53b43180fe30e88094b360577c87a22", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2406.04.00", + "addonVersionNumber": { + "major": 2406, + "minor": 4, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2406.9.0.json b/2406.9.0.json new file mode 100644 index 0000000..53a69ad --- /dev/null +++ b/2406.9.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB >= 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "9dee190dc2da5f2097962776ba99051bcadf4b95e340895a9bf02948609e4034", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2406.09.00", + "addonVersionNumber": { + "major": 2406, + "minor": 9, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2407.10.0.json b/2407.10.0.json new file mode 100644 index 0000000..85b26e2 --- /dev/null +++ b/2407.10.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB 115 & 128 beta)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "609ac8584c0a2119d8c7d5825fe41d9de004f371974343dd94baff374d23eac4", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2407.10.00", + "addonVersionNumber": { + "major": 2407, + "minor": 10, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "beta", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2407.11.0.json b/2407.11.0.json new file mode 100644 index 0000000..ac890b2 --- /dev/null +++ b/2407.11.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB 115)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "6ff59ccd44d29006e0035fa211244939d4d22b5fbfde14eea5866e079f3242c0", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2407.11.00", + "addonVersionNumber": { + "major": 2407, + "minor": 11, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2407.13.0.json b/2407.13.0.json new file mode 100644 index 0000000..4c8892b --- /dev/null +++ b/2407.13.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB 115 & 128 ESR)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "781294cbdadacf0452faa704df5205a502efb1eb90bfca74ee38cac5e86c2710", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2407.13.00", + "addonVersionNumber": { + "major": 2407, + "minor": 13, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2407.18.0.json b/2407.18.0.json new file mode 100644 index 0000000..a97000e --- /dev/null +++ b/2407.18.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB 115 & 128 ESR)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "61a365063395b4281c628e5160aa75851c1477ef72ca92162759e6faf6f1c4cb", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2407.18.00", + "addonVersionNumber": { + "major": 2407, + "minor": 18, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/2407.24.0.json b/2407.24.0.json new file mode 100644 index 0000000..11bc513 --- /dev/null +++ b/2407.24.0.json @@ -0,0 +1,29 @@ +{ + "addonId": "thunderbirdPlusG5", + "displayName": "Thunderbird+G5 (TB 115 & 128 ESR)\u0003", + "URL": "", + "description": "This add-on significantly increases the efficiency and comfort of using Thunderbird 115 with NVDA.\nFor more information, visit :\nhttps://www.rptools.org/NVDA-Thunderbird/get.php?pg=manual&v=g5&lang=en", + "sha256": "83584b509ff2f983b7cf790db186d355418e716f237fdf594f1770649632fb5e", + "homepage": "https://www.rptools.org/NVDA-Thunderbird/index.html", + "addonVersionName": "2407.24.00", + "addonVersionNumber": { + "major": 2407, + "minor": 24, + "patch": 0 + }, + "minNVDAVersion": { + "major": 2021, + "minor": 1, + "patch": 0 + }, + "lastTestedVersion": { + "major": 2024, + "minor": 1, + "patch": 0 + }, + "channel": "None", + "publisher": "", + "sourceURL": "https://github.com/RPTools-org/thunderbirdPlusG5", + "license": null, + "licenseURL": null +} \ No newline at end of file diff --git a/addon/appModules/messengerWindow/folderTreeItem.py b/addon/appModules/messengerWindow/folderTreeItem.py index d8588ba..73ac8e4 100644 --- a/addon/appModules/messengerWindow/folderTreeItem.py +++ b/addon/appModules/messengerWindow/folderTreeItem.py @@ -9,6 +9,7 @@ import controlTypes from wx import CallAfter, Menu, EVT_MENU from core import callLater +from scriptHandler import getLastScriptRepeatCount import winUser import addonHandler, os, sys from keyboardHandler import KeyboardInputGesture @@ -53,8 +54,8 @@ def script_sayFolderName(self, gesture): message(nm) def script_ftiNextUnread(self, gesture) : - # CallAfter(KeyboardInputGesture.fromName ("n").send ) - utils.getThreadTreeFromFG(focus=True, nextGesture="n") + if getLastScriptRepeatCount() == 0 : + utils.focusTTFromFT(self, sharedVars.oSettings.getOption("messengerWindow", "focusMode", kind="i")) script_ftiNextUnread.__doc__ = _("selects the first unread message in the list from the folder tree.") script_ftiNextUnread.category = sharedVars.scriptCategory # version g5 @@ -196,13 +197,13 @@ def buildMenu(self, o) : o = o.next return - def debugMenu(self) : - beep(600, 50) + # def debugMenu(self) : + # beep(600, 50) # sharedVars.debugLog = "" - sharedVars.logte("menu items count {}, nodes count {}".format(self.fMenu.MenuItemCount, len(self.nodes))) - litems = self.fMenu.GetMenuItems() - for i in range(0, self.fMenu.MenuItemCount) : - sharedVars.logte(str(i) + ": " + str(self.fMenu.GetLabel(i)) + ", ptr=" + str(self.nodes[i])[:10]) + # sharedVars.logte("menu items count {}, nodes count {}".format(self.fMenu.MenuItemCount, len(self.nodes))) + # litems = self.fMenu.GetMenuItems() + # for i in range(0, self.fMenu.MenuItemCount) : + # sharedVars.logte(str(i) + ": " + str(self.fMenu.GetLabel(i)) + ", ptr=" + str(self.nodes[i])[:10]) def showMenu(self, title="") : diff --git a/addon/appModules/messengerWindow/messageListItem.py b/addon/appModules/messengerWindow/messageListItem.py index 1771050..f190a7c 100644 --- a/addon/appModules/messengerWindow/messageListItem.py +++ b/addon/appModules/messengerWindow/messageListItem.py @@ -45,6 +45,7 @@ "kb:control+leftArrow" : "goGroupedFirst", "kb:control+rightArrow" : "goGroupedLast", # "kb:delete" : "deleteMsg", + # "kb:shift+delete" : "deleteMsg", "kb:a" : "sayShortcut", # "kb:shift+c" : "sayShortcut", # "kb:j" : "sayShortcut", @@ -98,18 +99,20 @@ class MessageListItem(IAccessible): timer = None timerCount = 0 def initOverlayClass (self): + # if sharedVars.lastKey == "del" : message(self.name) + self.bindGestures(TTIDefGestures) if not sharedVars.TTnoTags : self.bindGestures(TTITagGestures) + if sharedVars.handleDelete: + self.bindGesture("kb:delete", "deleteMsg") def script_sayLine(self, gesture): - rc = getLastScriptRepeatCount () - nm = self.name + rc = int(getLastScriptRepeatCount ()) if rc > 0 : - browseableMessage (message=nm.replace(", ", "\n"), title = _("Line details") + " - ThunderbirdPlus", isHtml = False) + browseableMessage (message=sharedVars.curTTRow.replace(", ", "\n"), title = _("Line details") + " - ThunderbirdPlus", isHtml = False) else : # 1 press - if sharedVars.TTClean or sharedVars.TTFillRow : message(sharedVars.curTTRow) - else : message(self.name) + message(self.name) script_sayLine.__doc__ = _("Message list : One press announces the current line, two presses displays the line text in a window.") script_sayLine.category=sharedVars.scriptCategory @@ -318,7 +321,7 @@ def script_readPreview(self, gesture) : sleep(0.1) api.processPendingEvents() if not o : return # 2023-09-12 gesture.send() - else : return sharedVars.oQuoteNav.readMail(o, ("shift" in gesture.modifierNames)) + else : return sharedVars.oQuoteNav.readMail(self, o, ("shift" in gesture.modifierNames)) else : return gesture.send() script_readPreview.__doc__ = _("Filtered reading of the message preview pane without leaving the list.") script_readPreview.category=sharedVars.scriptCategory @@ -329,16 +332,10 @@ def script_openMessage(self, gesture) : sharedVars.msgOpened = True return gesture.send() - # def script_deleteMsg(self,gesture): - # # sharedVars.logte("Before delete : " + sharedVars.curTTRow) - # # gesture.send() - # # sleep(.5) - # # callLater(200, fSayTTi) - # if sharedVars.gTimer : beep(100, 5) ; return - # gesture.send() - # sharedVars.gTimer = callLater(50, differMsg, True) - - + def script_deleteMsg(self,gesture): + CallAfter(focusNewRow,self.next, self.parent) + gesture.send() + def script_sayShortcut (self,gesture): global gSaying rc = getLastScriptRepeatCount() @@ -570,3 +567,13 @@ def run(self, obj) : if obj.childCount > 0 : self.run(obj) obj = obj.next + +def focusNewRow(obj, oParent) : + # beep(440, 10) + if obj : speech.speakText(obj.name) + else : + sm = utis.getSpeechMode() + utis.setSpeechMode_off() + KeyboardInputGesture.fromName("upArrow").send() + utis.setSpeechMode(sm) + KeyboardInputGesture.fromName("downArrow").send() diff --git a/addon/appModules/messengerWindow/tabAddressBook.py b/addon/appModules/messengerWindow/tabAddressBook.py index 2969e6a..f04d2a7 100644 --- a/addon/appModules/messengerWindow/tabAddressBook.py +++ b/addon/appModules/messengerWindow/tabAddressBook.py @@ -303,8 +303,8 @@ def logObjUnderCursor(self, x, y, label) : # if o.name : # break # o = o.parent - ID = "ID : " + str(utils.getIA2Attr(o)) - sharedVars.logte("* {} object under cursor x : {} y{}, {}, {}".format(label, x, y, self.getObjectProps(o), ID)) + # ID = "ID : " + str(utils.getIA2Attr(o)) + # sharedVars.logte("* {} object under cursor x : {} y{}, {}, {}".format(label, x, y, self.getObjectProps(o), ID)) def logLeftButtonState(self, label) : sharedVars.logte(label) diff --git a/addon/appModules/messengerWindow/tabs.py b/addon/appModules/messengerWindow/tabs.py index bb2ddbb..c370f6f 100644 --- a/addon/appModules/messengerWindow/tabs.py +++ b/addon/appModules/messengerWindow/tabs.py @@ -166,8 +166,9 @@ def getMainTabType(tabIdx, oFocus) : def findCurTab(oFrame=None ) : # returns : oCurtab, tabIndex, tabLastIdx # TB115 Path : Role-FRAME| i31, Role-TOOLBAR, , IA2ID : tabs-toolbar | i0, Role-TABCONTROL, , IA2ID : tabmail-tabs - try : - sharedVars.setLooping(True) + try : # finally + prevLooping = sharedVars.objLooping + sharedVars.setLooping(False) # get frame object o = getForegroundObject() # sharedVars.debugLog = "" @@ -193,10 +194,10 @@ def findCurTab(oFrame=None ) : i += 1 o = o.next if o : return o, pos, tabLastIdx - if sharedVars.debug : sharedVars.log(None, _("tab not found")) + # if sharedVars.debug : sharedVars.log(None, _("tab not found")) return None, -1, -1 finally : - sharedVars.setLooping(False) + sharedVars.setLooping(prevLooping) def getTabCount(oFrame=None) : # v5 path : role FRAME=34| i41, role-TOOLBAR=35, , IA2ID : tabs-toolbar | i1, role-TABCONTROL=23, , IA2ID : tabmail-tabs , IA2Attr : id : tabmail-tabs, display : -moz-box, child-item-count : 1, tag : tabs, , Actions : click ancestor, ; try : @@ -234,7 +235,7 @@ def activateTab(appMod,obj, newTabIdx) : oTab.doAction() else : message(msgName.format(newTabIdx+1, lastIdx+1, "")) # oTab.name)) - callLater(1500, activateDoc, oTab) + callLater(1500, activateDoc, oTab, newTabIdx) return True def changeTab(appMod, obj, direct) : # control+tab global msgName @@ -254,7 +255,7 @@ def changeTab(appMod, obj, direct) : # control+tab message(msgName.format(idx+1, lastIdx+1, "")) # oTab.name)) sleep(.5) oTab.doAction() # selects the new tab - callLater(1500, activateDoc, oTab) + callLater(1500, activateDoc, oTab, idx) return True appModule = tabObjects = None @@ -299,16 +300,17 @@ def tabContextMenu(appMod, obj) : oTab.setFocus() CallAfter(message, _("Active tab {0} of {1} : {2}, ").format(curIdx+1, lastIdx+1, oTab.name)) callLater(200, KeyboardInputGesture.fromName("shift+f10").send) # affiche menu contextuel -def activateDoc(oCurTab) : +def activateDoc(oCurTab, idx) : o = getFocusObject() - if o.role == controlTypes.Role.TAB : + if o.role == controlTypes.Role.TAB : KeyboardInputGesture.fromName("tab").send() elif o.role == controlTypes.Role.FRAME : oCurTab.setFocus() if sharedVars.curTab.startswith("sp:") : - callLater(20, KeyboardInputGesture.fromName("tab").send) + # beep(100, 30) + callLater(sharedVars.delayFocusDoc, KeyboardInputGesture.fromName("tab").send) else : - # callLater(20, utils.getFolderTreeFromFG, True) - if sharedVars.oSettings.getOption("messengerWindow","firstTabActivation") : k = "n" + # callLater(20, utils.focusThreadTree) + if sharedVars.oSettings.getOption("mainWindow","firstTabActivation") : k = "n" else : k = "end" - callLater(20, utils.getThreadTreeFromFG, True, k) + callLater(20, utils.focusThreadTree) diff --git a/addon/appModules/msgComposeWindow/msgComposeWindow.py b/addon/appModules/msgComposeWindow/msgComposeWindow.py index 53ef46c..aaebc7b 100644 --- a/addon/appModules/msgComposeWindow/msgComposeWindow.py +++ b/addon/appModules/msgComposeWindow/msgComposeWindow.py @@ -71,25 +71,26 @@ def update(self) : def getMsgHeader(self, oToolbar, idx, noText) : findID = self.labelsID[idx] - # sharedVars.debugLog = "" + sharedVars.debugLog = "" lbl = "" o = oToolbar.firstChild - if sharedVars.debug : sharedVars.log(o, "toolbar firstChild, ID a trouver : " + findID) + # sharedVars.log(o, "toolbar firstChild, ID a trouver : " + findID) while o : if o.role == controlTypes.Role.LABEL : if str(utis.getIA2Attribute(o)) == findID : - if sharedVars.debug : sharedVars.log(o, "Label") + # sharedVars.log(o, "Label") lbl = o.name + " : " oFocus = o o = o.next if not o : return None, "no obj" if o.role in (controlTypes.Role.EDITABLETEXT, controlTypes.Role.COMBOBOX) : return o, lbl + (" vide"if not o.value else o.value) - elif o.role == controlTypes.Role.UNKNOWN : + elif o.role in (controlTypes.Role.UNKNOWN, controlTypes.Role.PANE) : # TB115, TB128 oFocus = o + loopRole = o.role val = "" - while o and o.role == controlTypes.Role.UNKNOWN : - if sharedVars.debug : sharedVars.log(o, "objet inconnu") + while o and o.role == loopRole : + # sharedVars.log(o, "objet inconnu") val += o.name.split(">")[0] + ">, " o = o.next return oFocus, lbl + val @@ -104,7 +105,7 @@ def readField(self, mainKeyName, repeats) : lastIdx = len(self.labelsID) - 1 if mainKeyName > lastIdx : mainKeyName = lastIdx - 1 # subject oField, fieldText = self.getMsgHeader(self.headersToolbar, mainKeyName, (repeats > 0)) - # if sharedVars.debug : sharedVars.log(oField, fieldText) + # sharedVars.log(oField, fieldText) if not oField : if repeats == 0 : message(_("The field {0} is missing, type this command twice quickly to show it.").format(self.fieldLabels.split(",")[mainKeyName])) elif repeats > 0 : diff --git a/addon/appModules/msgComposeWindow/spellCheckDlg.py b/addon/appModules/msgComposeWindow/spellCheckDlg.py index 8d9f4a9..75ca2b5 100644 --- a/addon/appModules/msgComposeWindow/spellCheckDlg.py +++ b/addon/appModules/msgComposeWindow/spellCheckDlg.py @@ -36,9 +36,10 @@ def initOverlayClass (self): id =(self.IA2Attributes["id"] if hasattr (self,"IA2Attributes") and "id" in self.IA2Attributes else None) if role == controlTypes.Role.EDITABLETEXT : #beep(150, 30) - if _("None") in self.parent.getChild (1).name : - message(_("No misspelled words were found")) + # if _("None") in self.parent.getChild (1).name : + # message(_("No misspelled words were found")) #self.name = "" + self.bindGestures ({"kb:nvda+tab":"reportFocus","kb:ALT+UPARROW":"reportFocus", "kb:enter":"enterFromEdit", "kb:shift+enter":"enterFromEdit", "kb:control+enter":"enterFromEdit", "kb:control+shift+enter":"enterFromEdit", "kb:alt+enter":"enterFromEdit", "kb:alt+i":"altLetter", "kb:alt+n":"altLetter", "kb:alt+r":"altLetter", "kb:alt+t":"altLetter", "kb:alt+a":"altLetter"}) """ elif role == (controlTypes.Role.LISTITEM if hasattr(controlTypes, "Role") else controlTypes.ROLE_LISTITEM) and not self.previous :self.keyboardShortcut =self.container.keyboardShortcut """ @@ -126,7 +127,6 @@ def pressButton (self, btnID, sayMisp=False) : def script_reportFocus (self,gesture): c = getLastScriptRepeatCount () misp = self.parent.getChild (1).name - #print (misp) message(misp) if c == 2 : #speak ([u"Mot mal orthographié : " + misp]) @@ -140,7 +140,7 @@ def script_reportFocus (self,gesture): speakSpelling (self.value) elif c == 1 : if not sharedVars.oQuoteNav : sharedVars.initQuoteNav() - sharedVars.oQuoteNav.setDoc(sharedVars.oEditing, nav=True) + sharedVars.oQuoteNav.setDoc(sharedVars.oEditing, nav=True, fromSpellCheck=True) sharedVars.oQuoteNav.setText(0) # speakMode=0 silent sharedVars.oQuoteNav.findItem(misp) # else : diff --git a/addon/appModules/shared/checkListMenu.py b/addon/appModules/shared/checkListMenu.py new file mode 100644 index 0000000..7a4efe1 --- /dev/null +++ b/addon/appModules/shared/checkListMenu.py @@ -0,0 +1,79 @@ +# thunderbirdPlusG5/appModules/shared/checkListMenu.py. +# Written by Abdelkrimt ALIAS Abdel +import wx +from gui import guiHelper, nvdaControls +from tones import beep + +import addonHandler +addonHandler.initTranslation() + +class CheckListMenu(wx.Dialog): + + def __init__(self, parent, title, frame, options, fakeRadioGroups=None, postFunction=None): + super().__init__(parent, title=title) + self.frame = frame + self.options = options + self.fakeRadioGroups = fakeRadioGroups + self.postFunc = postFunction + mainSizer = wx.BoxSizer(wx.VERTICAL) + sHelper = guiHelper.BoxSizerHelper(self, wx.VERTICAL) + # Voici les éléments qui feront partie des cases à cocher. + self._elements = list(getattr(options, "option_%s" % frame).values()) + self.choicesBox = sHelper.addLabeledControl( + _("List of choices"), + nvdaControls.CustomCheckListBox, + choices = self._elements + ) + # On défini quels seront les items qui seront cochés par défaut. + checkedItems = [] + self.keys = list(getattr(options, "option_%s" % frame).keys()) + for key in self.keys: + if key in options.options[frame] and options.options[frame].as_bool(key): + checkedItems.append(self.keys.index(key)) + + self.choicesBox.Checked = [ + index for index in range(len(self._elements)) if index in checkedItems + ] + # On sélectionne par défaut le premier élément de la liste de cases à cocher. + self.choicesBox.Select(0) + sHelper.addDialogDismissButtons(self.CreateButtonSizer(wx.OK | wx.CANCEL)) + mainSizer.Add(sHelper.sizer, border=10, flag=wx.ALL) + mainSizer.Fit(self) + self.SetSizer(mainSizer) + # Événement du clic sur le bouton OK. + self.Bind(wx.EVT_BUTTON, self.onOk, id=wx.ID_OK) + self.choicesBox.SetFocus() + + def onOk(self, evt): + # self.frame is the section name in the ini file + choices = self.choicesBox.CheckedItems + if self.fakeRadioGroups : # list of tuples with indexes + for tuple in self.fakeRadioGroups : + lChecked = [] + for t in tuple : + if t in choices : lChecked.append(t) + if len(lChecked) > 1 : + self.choicesBox.Select(t) + self.choicesBox.SetFocus() + return self.displayError(lChecked) + + items = list(range(len(self.keys))) + for i in items: + key = self.keys[i] + if i in choices: + self.options.options[self.frame][key] = True + else: + self.options.options[self.frame][key] = False + self.options.options.write() + if self.postFunc : + self.postFunc(self.frame) + self.Close() + + def displayError(self, lstOptions) : + from ui import browseableMessage + msg = _("The options below cannot be checked at the same time :\n") + for e in lstOptions : + msg += self._elements[e] + " ; \n" + msg += _("Press escape to return to the option list") + return browseableMessage (message=msg, title=_("Error in two options - Thunderbird+G5"), isHtml = False) + \ No newline at end of file diff --git a/addon/appModules/shared/menuSettings.py b/addon/appModules/shared/menuSettings.py index 905fa5f..c9f41a5 100644 --- a/addon/appModules/shared/menuSettings.py +++ b/addon/appModules/shared/menuSettings.py @@ -1,6 +1,9 @@ #-*- coding:utf-8 -* import api, config, sys, glob, shutil +import gui, wx # Ajouté par Abdel. +from checkListMenu import CheckListMenu # Ajouté par Abdel. +from startupDlg import StartupDialog from configobj import ConfigObj import re import addonHandler, os, sys @@ -17,18 +20,18 @@ class Settings() : def __init__(self, fromClass) : # fromClass doit être une référence sur la classe AppModule ou GlobalPlugin self.refClass = fromClass - self.options = self.option_messengerWindow = self.option_msgcomposeWindow = self.option_startup = self.option_chichi = None + self.options = self.option_messengerWindow = self.option_mainWindow = self.option_msgcomposeWindow = self.option_deactiv = None self.regex_removeInSubject = None curAddon=addonHandler.getCodeAddon() self.addonName = curAddon.name - self.iniFile = api.config.getUserDefaultConfigPath()+"\\" + self.addonName + ".ini" - # if sharedVars.debug : sharedVars.log(None, "IniFile : " + self.iniFile) + self.iniFile = api.config.getUserDefaultConfigPath()+"\\" + self.addonName + "-1.ini" + # if sharedVars.debug : sharedVars.log(None, "-1IniFile : " + self.iniFile) self.responseMode = 0 basePath = os.path.join(curAddon.path) # sharedVars.log(None, "basepath : " + basePath) self.addonPath =basePath# + "\\AppModules" - self.copyTB4Ini() + # self.copyTB4Ini() # sharedVars.log(None, "addonpath : " + self.addonPath) self.load() # sharedVars.log(None, "Option VirtualSpellChk : " + str(self.options["msgcomposeWindow"]["virtualSpellChk"])) @@ -43,7 +46,16 @@ def initDefaults(self) : self.options["messengerWindow"]["separateCols"] = True self.options["messengerWindow"]["responseMentionGroup"] = True self.options["messengerWindow"]["junkStatusCol"] = True - # made by Chichi or the "start with inbox" thunderbird addon ->self.options["startup"]["alwaysMainTab"] = True + self.options["messengerWindow"]["delayFocusDoc"] = "25" + self.options["messengerWindow"]["focusMode"] = "1" + self.options["messengerWindow"]["focusOnStartup"] = False + sharedVars.delayFocusDoc = 25 + if not self.options["messengerWindow"]["focusMode"] : + # beep(80, 30) + self.options["messengerWindow"]["focusMode"] = "1" + self.options["messengerWindow"]["focusOnStartup"] = False + + # made by deactiv or the "start with inbox" thunderbird addon ->self.options["startup"]["alwaysMainTab"] = True self.options["msgcomposeWindow"]["closeMessageWithEscape"] = True self.options["msgcomposeWindow"]["spellWords"] = True @@ -57,94 +69,71 @@ def load(self): adPath = self.addonPath # adPath is the root of the addon path self.option_messengerWindow ={ - "TTClean" : _("Message list : custom vocalization of rows."), - "TTFillRow" : _("Message list : force rows to be filled if always blank."), - "TTnoFolderName" : _("Message list : Do not say the window and folder names when entering the list."), "responseMentionGroup" : _("Combine multiple 'RE' mentions into one"), + "TTClean" : _("custom vocalization of rows."), + "handleDelete" : _("If custom vocalization, announce the current line after line deletion (not recommanded for Braille)."), + "TTnoFolderName" : _("Do not say the window and folder names when entering the list."), "responseMentionGroup" : _("Combine multiple 'RE' mentions into one"), "responseMentionRemove" : _("Delete the 'Re' mentions in the subject column"), "responseMentionDelColon" : _("Delete the colons in the 'Re:' mentions"), "namesCleaned" : _("Clean the names of correspondents in the message list"), - # "separateCols" : _("Add punctuation between columns"), "listGroupName" : _("Hide mailing list names"), - "editWords_str" : _("Edit words to hide in message subject"), "junkStatusCol" : _("Announce 'junk' if displayed in the 'junk Status' column"), - # "TTFirstUnread" : _("Spacebar on a folder with unread searches for the first unread message from the beginning of the list"), - # "withoutFolderKeyNav" : _("Do not use first character navigation in the folder tree"), - # "noDirectKeyNav" : _("Character navigation via an edit box"), - "withoutReceipt" : _("Ignore acknowledgment requests"), - "displayTranslations" : _("Always display the translations"), - "firstTabActivation" : _("Access the first unread message when first activating the first tab, otherwise the last message."), - # "sayContact" : _("Address book : explicit announcement of contacts in the contact list."), + } - # "WwithUnread" : _("Show only folders with unread in the 'Folders in Tree' dialog"), - # "WithoutAutoRead" : _("separate reading window: do not automatically read the mmessage if it causes NVDA hangs"), - # "editDelay_str" : _("Edit the delay before the automatic reading of the separate message window.\\tAlt+d,n") + self.option_mainWindow={ + "firstTabActivation" : _("Access the first unread message when first activating the first tab, otherwise the last message."), + "withoutReceipt" : _("Ignore acknowledgment requests"), + "CleanPreview" : _("Partially purify the message when reading it with Space or F4, otherwise purify it completely."), + "browsePreview" : _("Always display the cleaned messages when reading them with Space or F4"), + "browseTranslation" : _("Always display the translation of messages when reading them with Space or F4"), } self.option_msgcomposeWindow={ "spellWords" : _("Spell Check: Spell the misspelled word and the suggested word."), # "virtualSpellChk" : _("Enable improved Spell Check while typing."), "closeMessageWithEscape" : _("The Esc key closes the message being written"), - "onePress" : _("Single press to show the context menus, double press to write a grave accent or Tilde or ¬¬.") + "onePress" : _("Single press on Shift+the key above the tab key to show the option menus, double press to write the corresponding printable character.") } - self.option_startup= {} - # # "alwaysMainTab" : _("Toujours activer l'onglet principal au démarrage de Thunderbird"), - # # "logging" : _("Journalisation (peut ralentir)") - # } - self.option_chichi = { - # "TTnoClean" : _("Message list : Do not clean table rows before announcement to improve responsiveness."), - # "TTAltReading" : _("Message list : use the alternate method to read the lines."), + self.option_deactiv = { "TTnoTags" : _("Message list : deactivate tag management to improve responsiveness."), "TTnoFilterSnd" : _("Message list : do not play sound when list is filtered and gets focus."), "SWRnoRead" : _("Separate reading window: do not read the cleaned version of the message when the window is opened."), "noAddressBook" : _("Address book : disable additional features of Thunderbird+G5."), - # "FTnoSpace" : _("Folders: Spacebar does not select the next unread message in the list and does not show the list of unread folders"), - # "FTnoNavLetter" : _("Folders: no first character navigation "), - # "TTnoSpace" : _("Message list: Spacebar does not read message from preview pane"), - # "TTNoExpand" : _("Message list: Spacebar reads the preview pane conversation summary."), - # "TTnoSmartReply" : _("Message list : No SmartReply"), - # "TTnoFilterBar" : _("Message list: do not manage the quick filter bar"), - # "TTnoEscape" : _("Message list: Escape does not return to folder tree"), - # "MainNoTab" : _("main window: Tab does not move to next pane"), - # "mainNoEscape" : _("Main window: restore the default behavior of the escape key"), - # "closeTBWithCtrlF4" : _("Allow Thunderbird to close with control+w or control+F4") } - self.options = ConfigObj(self.iniFile) - all_options = (("messengerWindow", self.option_messengerWindow),("msgcomposeWindow",self.option_msgcomposeWindow),("startup", self.option_startup), ("chichi", self.option_chichi)) + self.options = ConfigObj(self.iniFile, encoding="utf8") # Ajout du second paramètre par Abdel (L'encodage utf8 est très important afin d'éviter les erreurs d'encodage pour les caractères accentués". + all_options = (("messengerWindow", self.option_messengerWindow), ("mainWindow", self.option_mainWindow), ("msgcomposeWindow",self.option_msgcomposeWindow), ("deactiv", self.option_deactiv)) for x in all_options : section, keyValue =x if not section in self.options: self.options.update({section:{}}) for key in keyValue : if not key in self.options[section] : self.options[section].update({key:False}) + + self.setSharedVars(section="messengerWindow") section = self.options["messengerWindow"] - sharedVars.TTClean = section.as_bool ("TTClean") - sharedVars.TTFillRow = section.as_bool ("TTFillRow") - sharedVars.TTnoFolderName = section.as_bool ("TTnoFolderName") - #sharedVars.useKeyNav = not section.as_bool ("FKN1_withoutFolderKeyNav") - #sharedVars.directKeyNav = not section.as_bool ("FKN2_noDirectKeyNav") - if not"delayReadWnd" in self.options["messengerWindow"] : - self.options["messengerWindow"].update({"delayReadWnd":"100"}) - sharedVars.delayReadWnd = int(section.as_int ("delayReadWnd") ) + if "delayFocusDoc" not in section : self.options["messengerWindow"].update({"delayFocusDoc":"25"}) + sharedVars.delayFocusDoc = section.as_int("delayFocusDoc") + if "focusMode" not in section : + self.options["messengerWindow"].update({"focusMode":"1"}) + self.options["messengerWindow"].update({"focusOnStartup":"False"}) + self.options.write() + self.options["messengerWindow"]["focusMode"] = "1" + self.options["messengerWindow"]["focusOnStartup"] = False + else : # options are in section, we change their type + section["focusOnStartup"]= section.as_bool("focusOnStartup") + section["focusMode"]= section.as_int("focusMode") + # words to remove from subject in the message list if not "removeInSubject" in self.options["messengerWindow"] : self.options["messengerWindow"].update({"removeInSubject":""}) else : # option exists as string in the ini file self.regex_removeInSubject = re.compile(makeRegex(section["removeInSubject"])) + + + # coptions for deactiv : speed needed + self.setSharedVars(section="deactiv") - # coptions for chichi : speed needed - section = self.options["chichi"] - # sharedVars.TTnoClean = section.as_bool ("TTnoClean") - # sharedVars.TTAltReading = section.as_bool ("TTAltReading") - sharedVars.TTnoTags = section.as_bool ("TTnoTags") - sharedVars.noAddressBook = section.as_bool ("noAddressBook") - # sharedVars.FTnoNavLetter = False # section.as_bool ("FTnoNavLetter") - # sharedVars.FTnoSpace = False # section.as_bool ("FTnoSpace") - # sharedVars.TTnoSpace = False # section.as_bool ("TTnoSpace") - # sharedVars.TTnoFilterBar = False # section.as_bool ("TTnoFilterBar") - - # self.withFoldersList = section.as_bool ("WwithFoldersList") #sound import shutil soundPath = api.config.getUserDefaultConfigPath() + "\\TB+Sounds" @@ -160,17 +149,41 @@ def load(self): utis.objSoundFiles[basename(path)]= open (path,"rb").read () #utis.playSound("ding") # sharedVars.log(None, str(utis.objSoundFiles)) - self.setResponseMode() - self.setfolderTreeNav() # set sharedVars for optimization sharedVars.virtualSpellChk = False # self.getOption ("msgcomposeWindow", "virtualSpellChk") return + + def setSharedVars(self, section) : + pSection = self.options[section] + if section == "messengerWindow" : + sharedVars.TTClean = pSection.as_bool ("TTClean") + sharedVars.TTFillRow = False # removed : pSection.as_bool ("TTFillRow") + sharedVars.namesCleaned = pSection.as_bool ("namesCleaned") # correspondent names + sharedVars.TTnoFolderName = pSection.as_bool ("TTnoFolderName") + sharedVars.listGroupName = pSection.as_bool("listGroupName") + sharedVars.junkStatusCol = pSection.as_bool("junkStatusCol") + sharedVars.handleDelete = pSection.as_bool("handleDelete") + sharedVars.unread = _("Unread") + # merge 3 mutually exclusive boolean variables into one numeric variable + if pSection.as_bool("responseMentionGroup") : self.responseMode = 1 + elif pSection.as_bool("responseMentionRemove") : self.responseMode = 2 + elif pSection.as_bool("responseMentionDelColon") : self.responseMode = 3 + else : self.responseMode = 0 + elif section == "mainWindow" : # other options + sharedVars.oQuoteNav = None + # elif section == "msgComposeWindow" : + # pass + elif section == "deactiv" : + sharedVars.TTnoTags = pSection.as_bool ("TTnoTags") + sharedVars.noAddressBook = pSection.as_bool ("noAddressBook") + # CallLater(1000, message, "setSharedVars section : " + section) + def editWords(self) : wrds = self.options["messengerWindow"]["removeInSubject"] utis.inputBox(label=_("Words separated by semicolons :"), title= _("Edit words to hide in the subject of messages"), postFunction=saveWords, startValue=wrds) def editDelay(self) : - utis.inputBox(label=_("Delay between 20 and 2000 milliseconds before filtered reading (default: 100):"), title= _("Separate reading window"), postFunction=saveDelay, startValue=sharedVars.delayReadWnd) + utis.inputBox(label=_("Delay before document focusing, 20 to 2000 ms::"), title= _("Special tabs"), postFunction=saveDelay, startValue=sharedVars.delayFocusDoc) def openSoundFolder(self) : soundPath = api.config.getUserDefaultConfigPath() + "\\TB+Sounds" if not os.path.exists(soundPath) : return beep(100, 30) @@ -178,13 +191,13 @@ def openSoundFolder(self) : os.startfile(soundPath) def backup(self) : - bakFile = api.config.getUserDefaultConfigPath() + "\\" + self.addonName + ".inibak" + bakFile = api.config.getUserDefaultConfigPath() + "\\" + self.addonName + "-1.inibak" if not os.path.exists(self.iniFile) : self.options.write() shutil.copyfile(self.iniFile, bakFile) CallLater(30, utis.noSpeechMessage, u"La configuration actuelle a été sauvegardée dans un fichier .bakini.") def restore(self) : - bakFile = api.config.getUserDefaultConfigPath() + "\\" + self.addonName + ".inibak" + bakFile = api.config.getUserDefaultConfigPath() + "\\" + self.addonName + "-1.inibak" if os.path.exists(bakFile) : shutil.copyfile(bakFile, self.iniFile) self.load() @@ -193,7 +206,7 @@ def restore(self) : CallLater(30, utis.noSpeechMessage,_("Backup file does not exist.")) def reset(self) : - bakFile = api.config.getUserDefaultConfigPath() + "\\" + self.addonName + ".inibak" + bakFile = api.config.getUserDefaultConfigPath() + "\\" + self.addonName + "-1.inibak" if os.path.exists(self.iniFile) : if not os.path.exists(bakFile) : os.rename(self.iniFile, bakFile) @@ -203,53 +216,65 @@ def reset(self) : self.initDefaults() CallLater(30, utis.noSpeechMessage,_("The configuration has been reset to its default values")) - def copyTB4Ini(self) : - if os.path.exists(self.iniFile) : return - tb4File = api.config.getUserDefaultConfigPath() + "\\Thunderbird+4.ini" - if os.path.exists(tb4File) : - shutil.copyfile(tb4File, self.iniFile) + # def copyTB4Ini(self) : + # if os.path.exists(self.iniFile) : return + # tb4File = api.config.getUserDefaultConfigPath() + "\\Thunderbird+4.ini" + # if os.path.exists(tb4File) : + # shutil.copyfile(tb4File, self.iniFile) - def getOption(self, iniSect, iniKey="") : # si iniKey == "", retourne la section entière + def getOption(self, iniSect, iniKey="", kind="b") : # si iniKey == "", retourne la section entière + # kind Valuses : "" = no type conversion, b = bool, s = string, i = int if iniSect == "messenger" : iniSect = "messengerWindow" elif iniSect == "compose" : iniSect = "msgcomposeWindow" if iniKey == "" : return self.options[iniSect] else : - try : return self.options[iniSect].as_bool(iniKey) + try : + if kind == "b" : return self.options[iniSect].as_bool(iniKey) + elif kind == "" : return self.options[iniSect][iniKey] + elif kind == "i" : return self.options[iniSect].as_int(iniKey) except : return False - def setResponseMode(self): - if self.getOption("messengerWindow", "responseMentionGroup") : self.responseMode = 1 - elif self.getOption("messengerWindow", "responseMentionRemove") : self.responseMode = 2 - elif self.getOption("messengerWindow", "responseMentionDelColon") : self.responseMode = 3 - else : self.responseMode = 0 - - def setfolderTreeNav(self) : - sharedVars.useKeyNav = (False if self.getOption("messengerWindow", "withoutFolderKeyNav") else True) - sharedVars.directKeyNav = (False if self.getOption("messengerWindow", "noDirectKeyNav") else True) - def showOptionsMenu(self, frame) : mainMenu = Menu () # menu IDs :0=messenger, 100=compose, 200=startup # messengerWindow if frame == "messengerWindow" : + """ + Le bloc mulgilignes ci-dessous a été mis en commentaire par Abdel. menu, options, keys = Menu(), self.options, list(self.option_messengerWindow.keys()) #keys.sort () - - for e in range (len(keys)) : + for e in range (len(keys)) : lbl = self.option_messengerWindow [keys[e]] if keys[e].endswith("_str") : # == "editWords" : menu.Append(e, lbl) - else : + else : menu.AppendCheckItem (0 + e, lbl).Check (options["messengerWindow"].as_bool (keys[e])) - + """ # Fin du bloc multilignes mis en commentaire par Abdel. + menu = Menu() # Ajouté par Abdel. + item = None # Ajouté par Abdel. + for key in self.options["messengerWindow"].keys(): # Ajouté par Abdel. + if key.endswith("_str"): # Ajouté par Abdel. + item = key # Ajouté par Abdel. + if item: # Ajouté par Abdel. + self.options["messengerWindow"].pop(key) # Ajouté par Abdel. + menu.Append(1993, _("MessageList")) # Ajouté par Abdel. + menu.Append(1994, _("Edit words to hide in message subject")) # Ajouté par Abdel. + menu.Append(1997, _("Other Options")) # Added by PL 1995 to 1996 are already taken mainMenu.AppendSubMenu (menu, _("Main window options")) + mainMenu.Bind(EVT_MENU, self.onOptMenu) # msgCompose submenu if frame in ("messengerWindow", "msgcomposeWindow") : + """ + Le bloc multilignes ci-dessous a étémis en commentaire par Abdel. menu, options, keys = Menu (), self.options, list(self.option_msgcomposeWindow.keys()) #keys.sort () - for e in range (len (keys)): menu.AppendCheckItem (100+e, self.option_msgcomposeWindow[keys[e]]).Check (options["msgcomposeWindow"].as_bool (keys[e])) + for e in range (len (keys)): menu.AppendCheckItem (100+e, self.option_msgcomposeWindow[keys[e]]).Check (options["msgcomposeWindow"].as_bool (keys[e])) mainMenu.AppendSubMenu (menu, _("Write window options")) + """ # Fin du bloc multilignes mis en commentaire par Abdel. + mainMenu.Append (1995, _("Write window options")) # Ajouté par Abdel. mainMenu.Bind (EVT_MENU,self.onOptMenu) + """ + Le bloc multilignes ci-dessous a été mis en commentaire par Abdel. # mainMenu.Bind (EVT_MENU_CLOSE,self.onOptMenuClose) # startup submenu) if frame == "messengerWindow" : @@ -260,12 +285,18 @@ def showOptionsMenu(self, frame) : # menu.Append(200+e+1, getUpdateLabel()) # mainMenu.AppendSubMenu (menu, _("Update options")) mainMenu.Bind (EVT_MENU,self.onOptMenu) - # Chichi submenu + """ # Fin du bloc multilignes mis en commentaire par Abdel. + # deactiv submenu if frame == "messengerWindow" : - menu, options, keys = Menu (), self.options, list(self.option_chichi.keys()) - for e in range (len (keys)): menu.AppendCheckItem (300+e, self.option_chichi[keys[e]]).Check (options["chichi"].as_bool (keys[e])) + """ + Le bloc multilignes ci-dessous a été mis en commentaire par Abdel. + menu, options, keys = Menu (), self.options, list(self.option_deactiv.keys()) + for e in range (len (keys)): menu.AppendCheckItem (300+e, self.option_deactiv[keys[e]]).Check (options["deactiv"].as_bool (keys[e])) mainMenu.AppendSubMenu (menu, _("Deactivations")) + """ # Fin du bloc multilignes mis en commentaire par Abdel. + mainMenu.Append (1996, _("Deactivations")) # Ajouté par Abdel. mainMenu.Bind (EVT_MENU,self.onOptMenu) + mainMenu.Append(895, _("&Focus and Startup Options")) mainMenu.Append(899, _("Open sound folder...")) mainMenu.Append(900, _("Backup current configuration file")) mainMenu.Append(901, _("Restore backed up configuration file")) @@ -276,75 +307,72 @@ def showOptionsMenu(self, frame) : # def onOptMenuClose(self, evt) : # evt.Skip(False) # beep(440, 10) - + def onOptMenu(self, evt) : eID =evt.Id # menu IDs :0=messenger, 100=compose, 200=startup # sharedVars.debugLog = ", menu ID : " + str(eID) - if eID < 100 : # messengerWindow, options fenêtre principale - IDRange = 0 - section, keys, options = "messengerWindow", list(self.option_messengerWindow.keys()), self.options - key = keys[eID-IDRange] - # sharedVars.log(None, "choosen Key " + str(key)) - if key == "editWords_str" : # is not a check item - return CallLater(30, self.editWords) - if key == "editDelay_str" : # is not a check item - return CallLater(30, self.editDelay) -# ===== - toFind = _("Mentions") - if evt.EventObject.GetLabelText(eID).find (toFind)!=-1 : - for k in ("responseMentionGroup","responseMentionRemove","responseMentionDelColon"): - options[section][k] = False - # ==== - options[section][key]= evt.IsChecked () - if key == "TTClean" : sharedVars.TTClean = self.options[section][key] - if key == "TTFillRow" : sharedVars.TTFillRow = self.options[section][key] - if key == "TTnoFolderName" : sharedVars.TTnoFolderName = self.options[section][key] - self.setResponseMode() - self.setfolderTreeNav() - options.write () - # beep(700, 40) - # evt.Skip(False) + #if eID < 100 : # messengerWindow, options fenêtre principale -- Mis en commentaire par Abdel. + if eID == 1993: # Id créé par Abdel. + wx.CallAfter( + (gui.mainFrame.popupSettingsDialog if hasattr(gui.mainFrame, "popupSettingsDialog") + else gui.mainFrame._popupSettingsDialog), + CheckListMenu, title=_("Message list options"), frame="messengerWindow", options=self, + fakeRadioGroups=[(4,5,6)], + postFunction=self.setSharedVars) + return + if eID== 1994 : # is not a check item -- ID créé par Abdel. + return CallLater(30, self.editWords) + if eID == 1997 : # other options + wx.CallAfter( + (gui.mainFrame.popupSettingsDialog if hasattr(gui.mainFrame, "popupSettingsDialog") + else gui.mainFrame._popupSettingsDialog), + CheckListMenu, title=_("Other options"), frame="mainWindow", options=self, + fakeRadioGroups=None, + postFunction=self.setSharedVars(section="mainWindow")) return - elif eID < 200 : # msgcomposeWindow + #if eID < 200: # msgcomposeWindow -- Mis en commentaire par Abdel. + if eID == 1995: # ID créé par Abdel. IDRange = 100 - section, keys, options = "msgcomposeWindow", list(self.option_msgcomposeWindow.keys()), self.options - key=keys[eID-IDRange] - options[section][key]= evt.IsChecked () - if key == "virtualSpellChk" : - sharedVars.virtualSpellChk = self.options[section][key] - return options.write () - elif eID < 300 : # update options + #section, keys, options = "msgcomposeWindow", list(self.option_msgcomposeWindow.keys()), self.options -- Mis en commentaire par Abdel. + #key=keys[eID-IDRange] -- Mis en commentaire par Abdel. + #options[section][key]= evt.IsChecked () -- Mis en commentaire par Abdel. + wx.CallAfter( + (gui.mainFrame.popupSettingsDialog if hasattr(gui.mainFrame, "popupSettingsDialog") + else gui.mainFrame._popupSettingsDialog), + CheckListMenu, title=_("Write window options"), frame="msgcomposeWindow", options=self) + #if key == "virtualSpellChk" : -- Mis en commentaire par Abdel, la clé "virtualSpellChk" n'existe plus dans self.options["msgcomposeWindow"].keys(). + #sharedVars.virtualSpellChk = self.options[section][key] -- Mis en commentaire par Abdel pour les mêmes raisons. + #return options.write () -- Mis en commentaire par Abdel pour les mêmes raisons. + if eID < 300 : # update options IDRange = 200 section, keys, options = "startup", list(self.option_startup.keys()), self.options if eID == IDRange +4 : # old + len(keys)) : # last option :update CallLater(40, toggleUpdateState) return - key = keys[4] # =# keys[eID-IDRange] - options[section][key]= evt.IsChecked () + key = list(self.options["msgcomposeWindow"].keys())[4] # =# keys[eID-IDRange] + options["msgcomposeWindow"][key]= evt.IsChecked () if key == "logging" : - sharedVars.debug = options[section][key] + sharedVars.debug = options["msgcomposeWindow"][key] sharedVars.debugLog = "" return options.write () - # chichi - elif eID < 400 : # chichi + # deactiv + if eID == 1996: # ID créé par Abdel. IDRange = 300 - section, keys, options = "chichi", list(self.option_chichi.keys()), self.options - # if eID == (IDRange + len(keys)) : # last option :update - # CallLater(40, toggleUpdateState) - # return - key=keys[eID-IDRange] - options[section][key]= evt.IsChecked () - # if key == "TTnoSpace" : sharedVars.TTnoSpace = self.options[section][key] - # elif key == "TTnoFilterBar" : sharedVars.TTnoFilterBar = self.options[section][key] - # if key == "TTnoClean" : sharedVars.TTnoClean = self.options[section][key] - if key == "TTnoTags" : sharedVars.TTnoTags = self.options[section][key] - # elif key == "SWRnoRead :" - elif key == "noAddressBook" : sharedVars.noAddressBook = self.options[section][key] - # elif key == "FTnoSpace" : sharedVars.FTnoSpace = self.options[section][key] - return options.write () - elif eID == 899 : + wx.CallAfter( + (gui.mainFrame.popupSettingsDialog if hasattr(gui.mainFrame, "popupSettingsDialog") + else gui.mainFrame._popupSettingsDialog), + CheckListMenu, title=_("Deactivations"), frame="deactiv", options=self, + fakeRadioGroups=None, + postFunction=self.setSharedVars) + elif eID == 895 : # Focus and startup options + wx.CallAfter( + (gui.mainFrame.popupSettingsDialog if hasattr(gui.mainFrame, "popupSettingsDialog") + else gui.mainFrame._popupSettingsDialog), + StartupDialog, title=_("Focus and Startup Options"), options=self) + return + elif eID == 899 : # sound folder self.openSoundFolder() elif eID == 900 : self.backup() @@ -398,7 +426,7 @@ def saveWords(words) : # sharedVars.log(None, "Mots saisis " + words) # speech.cancelSpeech() sharedVars.oSettings.options["messengerWindow"]["removeInSubject"] = words - # sharedVars.delayReadWnd = iDelay + # sharedVars.delayFocusDoc = iDelay sharedVars.oSettings.options["messengerWindow"].update({"removeInSubject" : words}) sharedVars.oSettings.options.write() sharedVars.oSettings.regex_removeInSubject = re.compile(makeRegex(words)) @@ -410,6 +438,6 @@ def saveDelay(strDelay) : except : return beep(100, 50) # return CallLater(50, message, u"La valeur doit être un nombre") if iDelay < 20 or iDelay > 2000 : return beep(250, 50) # CallLater(50, message, u"Le délai doit être compris entre 20 et 2000 milli-secondes !") - sharedVars.delayReadWnd = iDelay - sharedVars.oSettings.options["messengerWindow"].update({"delayReadWnd":strDelay}) + sharedVars.delayFocusDoc = iDelay + sharedVars.oSettings.options["messengerWindow"].update({"delayFocusDoc":strDelay}) sharedVars.oSettings.options.write() diff --git a/addon/appModules/shared/quoteNav.py b/addon/appModules/shared/quoteNav.py index d881dbf..cb0337c 100644 --- a/addon/appModules/shared/quoteNav.py +++ b/addon/appModules/shared/quoteNav.py @@ -1,9 +1,9 @@ - #-*- coding:utf-8 -* +#-*- coding:utf-8 -* import addonHandler addonHandler.initTranslation() import re, speech, winUser -from ui import message, browseableMessage +from ui import message # , browseableMessage from core import callLater from core import callLater from tones import beep @@ -15,9 +15,9 @@ import controlTypes import treeInterceptorHandler, textInfos import sharedVars -import utis - - +import utis +import utils115 as utils +import textDialog # Attention : 2 non printable chars used here : Alt+0031 is used as a separator of quotes / messages. Alt+0030 as a temporary replacement of \n CNL = chr(30) # char new line # CNQ = chr(31) # char new quote, hard coded as  @@ -27,9 +27,13 @@ class QuoteNav() : curItem = lastItem = curQuote = 0 def __init__(self) : + self.clean = not sharedVars.oSettings.getOption("mainWindow", "CleanPreview") self.lItems = self.lQuotes = [] + self.nav = False self.translate = False # 2024.01.02 - self.browseTranslation = sharedVars.oSettings.getOption("messengerWindow", "displayTranslations") + self.browseTranslation = sharedVars.oSettings.getOption("mainWindow", "browseTranslation") + self.browsePreview = sharedVars.oSettings.getOption("mainWindow", "browsePreview") + self.fromSpellCheck = False self.iTranslate = None self.langTo = utis.getLang() @@ -69,11 +73,13 @@ def __init__(self) : self.regSubject = re.compile(u"(Re:|Ré )") self.regListName = re.compile ("\[.*\]|\{.*\}") # compile ("\[(.*)\]") def toggleTranslation(self) : - msg = _("message translation mode ") + msgEnab = _("Enabling message translation mode, ready.") + msgDisab = _("Disabling message translation mode, ready.") + if self.translate : self.translate = False self.iTranslate = None - return message(msg + _("Disabled")) + return message(msgDisab) try : self.iTranslate = [p for p in globalPluginHandler.runningPlugins if p.__module__ == 'globalPlugins.instantTranslate'][0] # sharedVars.logte("Instant Translate :" + str(self.iTranslate)) @@ -83,31 +89,15 @@ def toggleTranslation(self) : if not self.iTranslate : return message(_("The Instant Translate add-on is not active or not installed.")) self.translate = True - message(msg + _("Enabled")) - - def toggleBrowseTranslation(self) : - msg = _("Translation display mode {}") - self.browseTranslation = not self.browseTranslation - state = _("Enabled" if self.browseTranslation else _("Disabled")) - message(msg.format(state)) - - def readMail(self, oDoc, rev = False, spkMode=1): - # focus = getFocusObject() - # setFocusObject(oDoc) - # treeInterceptor = treeInterceptorHandler.getTreeInterceptor(oDoc) - # setFocusObject(focus) - # if treeInterceptor: - # try: - # info = treeInterceptor.makeTextInfo("all") - # except: - # pass - # else: - # message( - # text=info.text, - # brailleText="\n".join((oDoc.name, info.text))) - # beep(432, 10) - # # browseableMessage(message= str(info.text), title= str(oDoc.name), isHtml=False) - # return + message(msgEnab) + + def toggleBrowseMessage(self) : + # Translators : brace symbols will be replaced by the words enabling or disabling + msgEnab = _("Enabling message display mode, ready.") + msgDisab = _("Disabling message display mode, ready.") + self.browsePreview = not self.browsePreview + message(msgEnab if self.browsePreview else msgDisab) + def readMail(self, oFocus, oDoc, rev = False, spkMode=1): speech.cancelSpeech() for i in range(0, 20) : if oDoc.role == controlTypes.Role.DOCUMENT : @@ -126,33 +116,26 @@ def readMail(self, oDoc, rev = False, spkMode=1): # sleep(0.1) oDoc = getFocusObject() - def setDoc(self, oDoc, nav=False): + def setDoc(self, oDoc, nav=False, fromSpellCheck=False): # converts the doc into HTML code if not oDoc : return 0 self.nav = nav + self.fromSpellCheck = fromSpellCheck # self.text = "\n---" # alt+0031 self.text = "\n" # alt+0031 self.lItems = [] self.lQuotes = [] self.lastItem = -1 self.curItem = 0 - self.quoteMode = True - self.subject = "" # document without subject as name parID = str(utis.getIA2Attribute(oDoc.parent)) - if parID == "messageEditor" : - self.quoteMode = False - fg = getForegroundObject() - sharedVars.curSubject = fg.name + if parID in ("messageEditor", "spellCheckDlg") : self.quoteMode = False - elif parID == "spellCheckDlg" : - # sharedVars.curSubject = parID - self.QoteMode = False + else : + self.quoteMode = True - self.subject =sharedVars.curSubject.split(" - ")[0].strip() # ((" ,;:")) - if " " in self.subject : - p = self.subject.split(" ") - self.subject = p[len(p)-1].strip() + self.subject = getEndSubject(parID) + # sharedVars.logte("self.subject=" + self.subject) o=oDoc.firstChild # section ou paragraph # # sharedVars.logte(u"après o.firstChild " + str(o.role) + ", " + str(o.name)) @@ -203,6 +186,7 @@ def getDocObjects(self, oDoc) : def setText(self, speakMode=1) : + # textDialog.showText("code HTML", self.text) ; return self.deleteBlocks() # replace \n and
with  self.text = self.regBrPLi.sub(CNL, self.text) @@ -219,8 +203,9 @@ def setText(self, speakMode=1) : # beep(440, 20) # removes multiple pseudo \n  self.text=self.regMultiNL.sub(CNL,self.text) - self.cleanStdHeaders() - self.cleanMSHeaders() + if self.clean : + self.cleanStdHeaders() + self.cleanMSHeaders() # removes multiple spaces again self.text = self.regMultiSpaces.sub(" ", self.text) @@ -274,18 +259,18 @@ def buildLists(self, speakMode) : if speakMode > 0 : message(msg + self.lItems[self.curItem]) - def showTranslation(self, t) : - browseableMessage(message=t, title= _("Translation"), isHtml=False) - - def truncateSubj(self, text, minLen) : - text=self.regSubject.sub("",text) - text=self.regListName.sub("",text) - text=self.regMultiSpaces.sub(" ", text) - max = len(text) - # sharedVars.logte("TruncateSubj " + "{}, minLen : {}, maxLen : {}".format(text, minLen, max)) - if minLen <= max : return text - pos = minLen - 1 - while pos < max : + def displayMessage(self, subj, body) : + if subj == "" : subj = _("Translation") + textDialog.showText(title=subj, text=body, label="-") + + def truncateSubj(self, text, wantedLen) : + # text=self.regSubject.sub("",text) + # text=self.regListName.sub("",text) + # text=self.regMultiSpaces.sub(" ", text) + lenText = len(text) + if lenText <= wantedLen : return text + pos = wantedLen - 1 + while pos < lenText : if text[pos] == " " : return text[0:pos] pos += 1 @@ -300,19 +285,25 @@ def speakText(self, freq=0, speakMode=1) : msg = _("Preview copied: ") if self.translate : - t = self.iTranslate.translateAndCache(sharedVars.curSubject, "auto", self.langTo).translation - t = self.truncateSubj(t, 25) + " :\n" - t += self.iTranslate.translateAndCache(self.text.split("")[1] , "auto", self.langTo).translation - if self.browseTranslation : self.showTranslation(t) - else : message(msg + t) - else : - message(msg + self.text) + subject = self.iTranslate.translateAndCache(cleanSubject(sharedVars.curWinTitle), "auto", self.langTo).translation + subject = self.truncateSubj(subject, 25) + text = self.iTranslate.translateAndCache(self.text.split("")[1] , "auto", self.langTo).translation + if self.browseTranslation or self.browsePreview and not self.fromSpellCheck : self.displayMessage(subject, text) + else : message(msg + subject + text) + else : # no translation + if self.browsePreview and not self.fromSpellCheck : + subject = cleanSubject(sharedVars.curWinTitle) + subject = self.truncateSubj(subject, 25) + self.displayMessage(subject, self.text) + else : + message(msg + self.text) def speakQuote(self, quote) : if self.translate : quote = self.iTranslate.translateAndCache(quote, "auto", self.langTo).translation - if self.browseTranslation : self.showTranslation(quote) + if self.browseTranslation and not self.fromSpellCheck : self.displayMessage("", quote) else : message(quote) + def deleteMetas(self) : lbl = " -1 : + s = '
---------- Forwarded message ---------' + reg = re.compile(s + ".+?\") + self.text = reg.sub("", self.text) + + self.deleteMetas() # removes style css tag if self.text.find("