commit/placeMarkers: 2 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Thu, 05 Mar 2015 22:55:25 -0000

2 new commits in placeMarkers:

https://bitbucket.org/nvdaaddonteam/placemarkers/commits/9591ac830ebd/
Changeset:   9591ac830ebd
Branch:      None
User:        josephsl
Date:        2015-03-05 22:50:38+00:00
Summary:     Merged master

Affected #:  3 files

diff --git a/addon/globalPlugins/placeMarkers.py 
b/addon/globalPlugins/placeMarkers.py
index 1ad7f9a..6e7d742 100755
--- a/addon/globalPlugins/placeMarkers.py
+++ b/addon/globalPlugins/placeMarkers.py
@@ -1,4 +1,10 @@
 # -*- coding: UTF-8 -*-
+# Changed key commands
+# Date: 27/02/2015
+# Removed Open documentation option from add-on menu, as suggested by Bernd 
Dorer
+# Date: 16/02/2015
+# Added case sensitive search
+# Date: 2/02/2015
 # Removed fragment identifiers in bookmark filenames
 # Date: 24/06/2014
 # Support for enhanced skim reading in version 2014.1.
@@ -61,7 +67,7 @@ savedStrings = []
 _bookmarksFolder = os.path.join(_basePath, "bookmarks")
 _configPath = globalVars.appArgs.configPath
 
-def doFindText(text, reverse=False):
+def doFindText(text, reverse=False, caseSensitive=False):
        if not text:
                return
        obj=api.getFocusObject()
@@ -69,14 +75,14 @@ def doFindText(text, reverse=False):
        if hasattr(treeInterceptor,'TextInfo') and not 
treeInterceptor.passThrough:
                obj=treeInterceptor
                CursorManager._lastFindText=text
-       elif not controlTypes.STATE_MULTILINE in obj.states:
+       elif obj.role != controlTypes.ROLE_EDITABLETEXT:
                return
        try:
                info=obj.makeTextInfo(textInfos.POSITION_CARET)
        except (NotImplementedError, RuntimeError):
                info=obj.makeTextInfo(textInfos.POSITION_FIRST)
        try:
-               res=info.find(text,reverse=reverse)
+               res=info.find(text,reverse=reverse, caseSensitive=caseSensitive)
        except WindowsError:
                wx.CallAfter(gui.messageBox,
        # Translators: label of error dialog, translated in NVDA core.
@@ -105,8 +111,8 @@ def doFindText(text, reverse=False):
                _("Find Error"),
                wx.OK|wx.ICON_ERROR)
 
-def doFindTextUp(text):
-       doFindText(text, reverse=True)
+def doFindTextUp(text, caseSensitive=False):
+       doFindText(text, reverse=True, caseSensitive=caseSensitive)
 
 class GlobalPlugin(globalPluginHandler.GlobalPlugin):
 
@@ -146,13 +152,6 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
                # Translators: the tooltip text for an item of addon submenu.
                _("Restore previously saved place markers"))
                gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onRestore, 
self.restoreItem)
-               self.aboutItem = self.BSMenu.Append(wx.ID_ANY,
-               # Translators: the name for an item of addon submenu.
-               _("Open &documentation"),
-               # Translators: the tooltip text for an item of addon submenu.
-               _("Open documentation for current language"))
-               gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onAbout, 
self.aboutItem)
-
                self._pickle = ""
                self._states = []
 
@@ -242,37 +241,6 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
                                wx.OK|wx.ICON_ERROR)
                                raise e
 
-       def getDocFolder(self):
-               langs = [languageHandler.getLanguage(), "en"]
-               for lang in langs:
-                       docFolder = os.path.join(os.path.dirname(__file__), 
"..", "doc", lang)
-                       if os.path.isdir(docFolder):
-                               return docFolder
-                       if "_" in lang:
-                               tryLang = lang.split("_")[0]
-                               docFolder = 
os.path.join(os.path.dirname(__file__), "..", "doc", tryLang)
-                               if os.path.isdir(docFolder):
-                                       return docFolder
-                               if tryLang == "en":
-                                       break
-                       if lang == "en":
-                               break
-               return None
-
-       def getDocPath(self, docFileName):
-               docPath = self.getDocFolder()
-               if docPath is not None:
-                       docFile = os.path.join(docPath, docFileName)
-                       if os.path.isfile(docFile):
-                               docPath = docFile
-               return docPath
-
-       def onAbout(self, evt):
-               try:
-                       os.startfile(self.getDocPath("readme.html"))
-               except WindowsError:
-                       pass
-
        def standarFileName(self, fileName):
                fileName.encode("mbcs")
                notAllowed = re.compile("\?|:|\*|\t|<|>|\"|\/|\\||") # Invalid 
characters
@@ -605,9 +573,9 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
                "kb:control+shift+NVDA+f": "specificFind",
                "kb:control+shift+NVDA+k": "saveBookmark",
                "kb:control+shift+NVDA+delete": "deleteBookmark",
-               "kb:control+shift+k": "selectNextBookmark",
+               "kb:NVDA+k": "selectNextBookmark",
                "kb:shift+NVDA+k": "selectPreviousBookmark",
-               "kb:NVDA+k": "copyCurrentBookmarksFile",
+               "kb:control+shift+k": "copyCurrentBookmarksFile",
        }
 
 class SpecificSearchDialog(SettingsDialog):
@@ -652,7 +620,13 @@ class SpecificSearchDialog(SettingsDialog):
                actionsListSizer.Add(self.actionsList)
                settingsSizer.Add(actionsListSizer,border=10,flag=wx.BOTTOM)
 
+               # Translators: An option in specific search to perform 
case-sensitive search, copied from core.
+               
self.caseSensitiveCheckBox=wx.CheckBox(self,wx.NewId(),label=_("Case 
&sensitive"))
+               self.caseSensitiveCheckBox.SetValue(False)
+               
settingsSizer.Add(self.caseSensitiveCheckBox,border=10,flag=wx.BOTTOM)
+
                self.textsList.Bind(wx.EVT_CHOICE, self.onChoice)
+               self.actionsList.Bind(wx.EVT_CHOICE, self.onAction)
 
        def postInit(self):
                self.textToSearchEdit.SetFocus()
@@ -660,13 +634,21 @@ class SpecificSearchDialog(SettingsDialog):
        def onChoice(self, evt):
                
self.textToSearchEdit.SetValue(self.textsList.GetStringSelection())
 
+       def onAction(self, evt):
+               if self.actionsList.Selection == 2:
+                       self.caseSensitiveCheckBox.Disable()
+               else:
+                       self.caseSensitiveCheckBox.Enable()
+
        def onOk(self,evt):
                textToSearch = self.textToSearchEdit.GetValue()
                actionToPerform = self.actionsList.GetSelection()
+               if actionToPerform < 2:
+                       caseSensitive = self.caseSensitiveCheckBox.GetValue()
                if actionToPerform == 0:
-                       wx.CallLater(100, doFindText, textToSearch)
+                       wx.CallLater(100, doFindText, textToSearch, 
caseSensitive=caseSensitive)
                elif actionToPerform == 1:
-                       wx.CallLater(100, doFindTextUp, textToSearch)
+                       wx.CallLater(100, doFindTextUp, textToSearch, 
caseSensitive)
                else:
                        global savedStrings
                        try:

diff --git a/buildVars.py b/buildVars.py
index e92cb6f..ccd36a9 100755
--- a/buildVars.py
+++ b/buildVars.py
@@ -19,7 +19,7 @@ addon_info = {
        # Translators: Long description to be shown for this add-on on add-on 
information from add-ons manager
        "addon_description" : _("Add-on for setting place markers on specific 
virtual documents"),
        # version
-       "addon_version" : "4.2",
+       "addon_version" : "5.0-dev",
        # Author(s)
        "addon_author" : u"Noelia <nrm1977@xxxxxxxxx>, Chris 
<llajta2012@xxxxxxxxxxx>",
        # URL for the add-on documentation support

diff --git a/readme.md b/readme.md
index 88ae0a6..4d44ba6 100644
--- a/readme.md
+++ b/readme.md
@@ -15,9 +15,9 @@ This addon is based on SpecificSearch and Bookmark&Search, 
developed by the same
 *      control+shift+NVDA+f; opens a dialog with a edit box that shows the 
last saved search; in this dialog you can also select the previously saved 
searches from a combo box and choose an action from the next combo box. If 
there is no available files for specific search in the current document, NVDA 
will warn you that it is not found any file for specific search.
 *      control+shift+NVDA+k; Saves the current position as a bookmark
 *      control+shift+NVDA+delete; Deletes the bookmark corresponding to this 
position.
-*      control+shift+k; Moves to the next bookmark.
+*      NVDA+k; Moves to the next bookmark.
 *      shift+NVDA+k; Moves to the previous bookmark.
-*      NVDA+k; Copies to clipboard the file name, without extension, where the 
place markers data will be saved.
+*      control+shift+k; Copies to clipboard the file name, without extension, 
where the place markers data will be saved.
 
 ## Place markers Submenu (NVDA+N) ##
 
@@ -32,6 +32,12 @@ Using Place markers submenu, under Preferences menu, you can 
access:
 
 Note: The bookmark position is based on the number of characters; and 
therefore in pages with a dynamic content is better to use the specific search, 
and not the bookmarks which save a precise position.
 
+
+## Changes for 5.0 ##
+* Added case sensitive search.
+* Removed option to open documentation from Place markers menu.
+* More intuitive key commands.
+
 ## Changes for 4.0 ##
 * Removed fragment identifiers from bookmark filenames, which can avoid issues 
in ePUBREADER Firefox add-on.
 * Add-on help is available from the Add-ons Manager.


https://bitbucket.org/nvdaaddonteam/placemarkers/commits/70f8b4cef96b/
Changeset:   70f8b4cef96b
Branch:      stable
User:        josephsl
Date:        2015-03-05 22:55:01+00:00
Summary:     Place Markers 5.0 stable

Signed-off-by: Joseph Lee <joseph.lee22590@xxxxxxxxx>

Affected #:  1 file

diff --git a/buildVars.py b/buildVars.py
index ccd36a9..f331414 100755
--- a/buildVars.py
+++ b/buildVars.py
@@ -19,7 +19,7 @@ addon_info = {
        # Translators: Long description to be shown for this add-on on add-on 
information from add-ons manager
        "addon_description" : _("Add-on for setting place markers on specific 
virtual documents"),
        # version
-       "addon_version" : "5.0-dev",
+       "addon_version" : "5.0",
        # Author(s)
        "addon_author" : u"Noelia <nrm1977@xxxxxxxxx>, Chris 
<llajta2012@xxxxxxxxxxx>",
        # URL for the add-on documentation support

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

--

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: