Skip to content

Commit

Permalink
Merge pull request #55 from nvdaes/copy
Browse files Browse the repository at this point in the history
Improve notifications when article or URL are copied
  • Loading branch information
nvdaes authored Dec 22, 2024
2 parents 3bd2374 + 768e6b6 commit 3aaf436
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
15 changes: 5 additions & 10 deletions addon/globalPlugins/readFeeds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def onCopy(self, evt):
_("Copy feed address"),
wx.YES | wx.NO | wx.CANCEL | wx.ICON_QUESTION
) == wx.YES:
api.copyToClip(address)
core.callLater(50, api.copyToClip, address, True)

def onNew(self, evt):
# Translators: The label of a field to enter an address for a new feed.
Expand Down Expand Up @@ -559,7 +559,7 @@ def onArticlesListInfo(self, evt):
wx.YES | wx.NO | wx.CANCEL | wx.ICON_QUESTION
) == wx.YES:
articleInfo = f"{title}\n{address}\n"
api.copyToClip(articleInfo)
core.callLater(50, api.copyToClip, articleInfo, True)

def onClose(self, evt):
self.Parent.Enable()
Expand Down Expand Up @@ -943,10 +943,8 @@ def script_readCurrentArticle(self, gesture):
title=re.sub(TAG_REGEXP, '', self.feed.getArticleTitle()),
address=self.feed.getArticleLink()
)
if scriptHandler.getLastScriptRepeatCount() == 1 and api.copyToClip(articleInfo):
# Translators: message presented when the information about an article of a feed
# is copied to the clipboard.
ui.message(_("Copied to clipboard %s") % articleInfo)
if scriptHandler.getLastScriptRepeatCount() == 1:
api.copyToClip(articleInfo, True)
else:
ui.message(articleInfo)

Expand Down Expand Up @@ -997,7 +995,4 @@ def script_copyArticleInfo(self, gesture):
title=re.sub(TAG_REGEXP, '', self.feed.getArticleTitle()),
address=self.feed.getArticleLink()
)
if api.copyToClip(articleInfo):
# Translators: message presented when the information about an article of a feed
# is copied to the clipboard.
ui.message(_("Copied to clipboard %s") % articleInfo)
api.copyToClip(articleInfo, True)
2 changes: 1 addition & 1 deletion buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# Documentation file name
"addon_docFileName": "readme.html",
# Minimum NVDA version supported (e.g. "2018.3")
"addon_minimumNVDAVersion": "2024.1.0",
"addon_minimumNVDAVersion": "2024.4.1",
# Last NVDA version supported/tested (e.g. "2018.4", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion": "2024.4",
# Add-on update channel (default is stable or None)
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ It contains the following controls:
* NVDA will display an error message if a new feed cannot be created.
* The title of the articles list dialog displays the selected feed name and number of items available.

## Changes for 39.0.0

* Improved notifications when title or URL are copied.

## Changes for 34.0.0

* Added support for rss.cbc.ca feeds.
Expand Down

0 comments on commit 3aaf436

Please sign in to comment.