commit/readFeeds: 2 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Mon, 05 Dec 2016 08:02:50 -0000

2 new commits in readFeeds:

https://bitbucket.org/nvdaaddonteam/readfeeds/commits/4d15af950f42/
Changeset:   4d15af950f42
Branch:      None
User:        norrumar
Date:        2016-12-05 07:51:51+00:00
Summary:     Added an edit box to filter elements of the feeds list. Set focus 
in the edit box as not always work for the list.

Affected #:  1 file

diff --git a/addon/globalPlugins/readFeeds.py b/addon/globalPlugins/readFeeds.py
index f281456..5a3bd4f 100644
--- a/addon/globalPlugins/readFeeds.py
+++ b/addon/globalPlugins/readFeeds.py
@@ -74,9 +74,16 @@ class FeedsDialog(wx.Dialog):
                feedsListGroupSizer = wx.StaticBoxSizer(wx.StaticBox(self), 
wx.HORIZONTAL)
                feedsListGroupContents = wx.BoxSizer(wx.HORIZONTAL)
                changeFeedsSizer = wx.BoxSizer(wx.VERTICAL)
-               names = [os.path.splitext(filename)[0] for filename in 
os.listdir(FEEDS_PATH)]
+
+               # Translators: The label of an edit box to search feeds.
+               searchTextLabel = _("&Text to search:")
+               searchLabeledCtrl = gui.guiHelper.LabeledControlHelper(self, 
searchTextLabel, wx.TextCtrl)
+               self.searchTextEdit = searchLabeledCtrl.control
+               self.searchTextEdit.Bind(wx.EVT_TEXT, 
self.onSearchEditTextChange)
+
+               self.choices = [os.path.splitext(filename)[0] for filename in 
os.listdir(FEEDS_PATH)]
                self.feedsList = wx.ListBox(self,
-                       choices=names)
+                       choices=self.choices)
                self.feedsList.Selection = 0
                self.feedsList.Bind(wx.EVT_LISTBOX, self.onFeedsListChoice)
                changeFeedsSizer.Add(self.feedsList, proportion=1.0)
@@ -124,7 +131,7 @@ class FeedsDialog(wx.Dialog):
                mainSizer.Add(sHelper.sizer, flag=wx.ALL, 
border=guiHelper.BORDER_FOR_DIALOGS)
                mainSizer.Fit(self)
                self.Sizer = mainSizer
-               self.feedsList.SetFocus()
+               self.searchTextEdit.SetFocus()
                self.Center(wx.BOTH | wx.CENTER_ON_SCREEN)
 
        def __del__(self):
@@ -140,6 +147,13 @@ class FeedsDialog(wx.Dialog):
                        f.close()
                return feedName
 
+       def onSearchEditTextChange(self, evt):
+               self.feedsList.Clear()
+               for choice in self.choices:
+                       if self.searchTextEdit.Value.lower() not in 
choice.lower():
+                               continue
+                       self.feedsList.Append(choice)
+
        def onFeedsListChoice(self, evt):
                self.sel = self.feedsList.Selection
                self.stringSel = self.feedsList.StringSelection
@@ -191,7 +205,7 @@ class FeedsDialog(wx.Dialog):
        def onDefault(self, evt):
                config.conf["readFeeds"]["addressFile"] = self.stringSel
                self.onFeedsListChoice(None)
-               self.feedsList.SetFocus()
+               self.searchTextEdit.SetFocus()
 
        def onRename(self, evt):
                # Translators: The label of a field to enter a new name for a 
feed.


https://bitbucket.org/nvdaaddonteam/readfeeds/commits/f86d818c4c0d/
Changeset:   f86d818c4c0d
Branch:      enhancedgui
User:        norrumar
Date:        2016-12-05 08:01:26+00:00
Summary:     Removed unused script and added script to show the feeds dialog, 
without gesture assigned.

Affected #:  1 file

diff --git a/addon/globalPlugins/readFeeds.py b/addon/globalPlugins/readFeeds.py
index 5a3bd4f..0d8880a 100644
--- a/addon/globalPlugins/readFeeds.py
+++ b/addon/globalPlugins/readFeeds.py
@@ -330,6 +330,11 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
                d.Show()
                gui.mainFrame.postPopup()
 
+       def script_feedsDialog(self, gesture):
+               wx.CallAfter(self.onFeeds, None)
+       # Translators: message presented in input mode.
+       script_feedsDialog.__doc__ = _("Shows the Feeds dialog.")
+
        def getFirstFeed(self):
                if not self.feed:
                        try:
@@ -396,7 +401,6 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
                "kb:control+shift+NVDA+o": "readNextFeed",
                "kb:control+shift+NVDA+u": "readPriorFeed",
                "kb:control+shift+NVDA+space": "reportLink",
-               "kb:control+shift+NVDA+enter": "setAddress",
                "kb:shift+NVDA+enter": "copyFeedInfo",
        }

Repository URL: https://bitbucket.org/nvdaaddonteam/readfeeds/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

Other related posts: