From fa0ee77fafa2019616737cb7d7ae17e292ba7a23 Mon Sep 17 00:00:00 2001 From: HamadaTrichine Date: Fri, 19 Nov 2021 20:23:56 +0100 Subject: [PATCH] Changed version and documentation and added a donation dialog. Changed the readMe to include the new feature (Find dialog wrapping) --- .../screenWrapping/wrappingSettingsGui.py | 9 ++++++--- addon/installTasks.py | 15 +++++++++++++++ buildVars.py | 4 ++-- readme.md | 6 ++++-- 4 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 addon/installTasks.py diff --git a/addon/globalPlugins/screenWrapping/wrappingSettingsGui.py b/addon/globalPlugins/screenWrapping/wrappingSettingsGui.py index e6dad64..bafe8c2 100644 --- a/addon/globalPlugins/screenWrapping/wrappingSettingsGui.py +++ b/addon/globalPlugins/screenWrapping/wrappingSettingsGui.py @@ -1,7 +1,7 @@ # screenWrapping # Copyright 2018 Hamada Trichine, released under GPLv2. -import wx, gui, config +import wx, gui, config, api class ScreenWrappingSettings(gui.SettingsPanel): # Translators: The name of the addon. @@ -12,9 +12,12 @@ def makeSettings(self, sizer): # Translators: Text for the check box in the settings that turns on or off the beeps when wrapping. self.beepsCheckBox = self.sizer.addItem(wx.CheckBox(self, id=wx.ID_ANY, label=_("&Play a beep when wrapping"))) self.beepsCheckBox.SetValue(config.conf["screenWrapping"]["turnOnBeeps"]) - + # Translators: Text for the button in the settings that copys the donation E-mail to the clipboard. + self.copyDonationMailButton = self.sizer.addItem(wx.Button(self, id=wx.ID_ANY, label=_("&Copy PayPal donation E-mail to clipboard"))) + self.copyDonationMailButton.Bind(wx.EVT_BUTTON, lambda e: api.copyToClip("hatrichine25@gmail.com")) + def onSave(self): config.conf["screenWrapping"]["turnOnBeeps"] = self.beepsCheckBox.GetValue() - + def onDiscard(self): return \ No newline at end of file diff --git a/addon/installTasks.py b/addon/installTasks.py new file mode 100644 index 0000000..7001d44 --- /dev/null +++ b/addon/installTasks.py @@ -0,0 +1,15 @@ +# screenWrapping +# Copyright 2018 Hamada Trichine, released under GPLv2. + +import addonHandler +addonHandler.initTranslation() + + +def onInstall(): + import wx, api + # Translators: donation dialog title. + dialogTitle = _("Would you like to donate?") + # Translators: donation dialog message. + ret = wx.MessageBox(_("If you like my work, please consider donating. Any contribution you can give helps me to keep going. My paypal E-mail is hatrichine25@gmail.com. Would you like to copy it to your clipboard? You can always find it under nvda settings/screen wrapping"), dialogTitle, style=wx.YES_NO) + if ret == wx.YES: + api.copyToClip("hatrichine25@gmail.com") diff --git a/buildVars.py b/buildVars.py index e9032e8..5a657f3 100644 --- a/buildVars.py +++ b/buildVars.py @@ -19,9 +19,9 @@ # Translators: Long description to be shown for this add-on on add-on information from add-ons manager "addon_description" : _("""This addon brings the screen wrapping feature to nvda. When you press quick navigation keys such as h, b, f and others, you will be placed on the next element regardless of your current position on a webpage. - If elements are not found below your position, you will be placed at the first element of the requested type available from the beginning of the page and vice versa when you are searching upwards."""), + If elements are not found below your position, you will be placed at the first element of the requested type available from the beginning of the page and vice versa when you are searching upwards. this also extends to the find dialog of nvda."""), # version - "addon_version" : "1.7", + "addon_version" : "1.8", # Author(s) "addon_author" : u"Hamada Trichine ", # URL for the add-on documentation support diff --git a/readme.md b/readme.md index 53c333a..359e4f0 100644 --- a/readme.md +++ b/readme.md @@ -5,14 +5,15 @@ This add-on brings the screen wrapping feature to nvda. Screen wrapping is a feature that makes the screen reader go automatically to the top of the page -and vice versa when no more quick navigation items are available in the direction you are going in while using the single letter navigation keys. +and vice versa when no more quick navigation items are available in the direction you are going in while using the single letter navigation keys. This functionality extends to the nvda find dialog as well. ## usage The use of this add-on is simple, all you have to do is follow the steps below: 1. Install the add-on - 2. Go and try to navigate the web using the single letter navigation keys + 2. Go and try to navigate the web using the single letter navigation keys, or try to do a search using NVDA+CTRL+F (default gesture). + Note: in a search the wrapping functionality is dependent on the check box in the find dialog. If the wrap around check box is checked, then continuing a search with nvda+F3/NVDA+SHIFT+F3 will allow you to wrap around, otherwise it falls back to standard behaviour. 3. You can toggle screen wrapping on or off using **nvda+h**. Note: you can change the gesture used here from the NVDAInputGestures manager, you will find it under the browse mode category. @@ -25,6 +26,7 @@ In the case of any bugs you can mention me on twitter [at HamadaTrichine](https: Here is the list of all contributors: * Marlon Sousa (spelling, translations, NVDA 2019.3 and 2021.1 compatibility) + Valentin (Russian translation) [1]: https://github.com/hamadatrichine/nvda-screen-wrapping/releases/latest