2 new commits in placeMarkers:
https://bitbucket.org/nvdaaddonteam/placemarkers/commits/633e8fa013d0/
Changeset: 633e8fa013d0
Branch: None
User: norrumar
Date: 2016-11-05 22:42:39+00:00
Summary: Cleanup: use bookmarks instead of searchBookmarks in variable name
of plugin. Remove try-except for startfile, as in NVDA.
Affected #: 1 file
diff --git a/addon/globalPlugins/placeMarkers/__init__.py
b/addon/globalPlugins/placeMarkers/__init__.py
index 05a024e..5618bae 100644
--- a/addon/globalPlugins/placeMarkers/__init__.py
+++ b/addon/globalPlugins/placeMarkers/__init__.py
@@ -466,10 +466,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
pass
def onSpecificSearch(self, evt):
- try:
- os.startfile(SEARCH_FOLDER)
- except WindowsError:
- pass
+ os.startfile(SEARCH_FOLDER)
def script_openSpecificSearchFolder(self, gesture):
wx.CallAfter(self.onSpecificSearch, None)
@@ -477,10 +474,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
script_openSpecificSearchFolder.__doc__ = _("Opens the specific search
folder.")
def onBookmarks(self, evt):
- try:
- os.startfile(BOOKMARKS_FOLDER)
- except WindowsError:
- pass
+ os.startfile(BOOKMARKS_FOLDER)
def script_openBookmarksFolder(self, gesture):
wx.CallAfter(self.onBookmarks, None)
@@ -544,17 +538,17 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
return
start.setEndPoint(end, "endToStart")
count = len(start.text)
- savedBookmarks = getSavedBookmarks()
- if count in savedBookmarks:
+ bookmarks = getSavedBookmarks()
+ if count in bookmarks:
ui.message(
# Translators: message presented when the
current position was previously saved as a bookmark.
_("This position was already saved"))
return
- savedBookmarks.append(count)
- savedBookmarks.sort()
+ bookmarks.append(count)
+ bookmarks.sort()
fileName = getFileBookmarks()
try:
- cPickle.dump(savedBookmarks, file(fileName, "wb"))
+ cPickle.dump(bookmarks, file(fileName, "wb"))
ui.message(
# Translators: message presented when a
position is saved as a bookmark.
_("Saved position at character %d") %count)
https://bitbucket.org/nvdaaddonteam/placemarkers/commits/cc03873f58b5/
Changeset: cc03873f58b5
Branch: 7.0
User: norrumar
Date: 2016-11-05 23:00:35+00:00
Summary: Make installTasks compatible with add-on changes.
Affected #: 1 file
diff --git a/addon/installTasks.py b/addon/installTasks.py
index c8fcb81..2b67c32 100644
--- a/addon/installTasks.py
+++ b/addon/installTasks.py
@@ -1,3 +1,8 @@
+# -*- coding: UTF-8 -*-
+# installTasks for placeMarkers add-on
+#Copyright (C) 2016 Noelia Ruiz Martínez
+# Released under GPL 2
+
import addonHandler
import os
import shutil
@@ -12,15 +17,15 @@ def onInstall():
addonPath = os.path.join(configPath, "placeMarkersBackup")
if not os.path.isdir(addonPath):
return
- basePath = os.path.dirname(__file__)
- savePath = os.path.join(basePath, "globalPlugins", "placeMarkers")
if gui.messageBox(
# Translators: label of a dialog presented when installing this addon
and placeMarkersBackup is found.
_("Your configuration folder for NVDA contains files that seem to be
derived from a previous version of this add-on. Do you want to update it?"),
# Translators: title of a dialog presented when installing this addon
and placeMarkersBackup is found.
_("Install or update add-on"),
wx.YES|wx.NO|wx.ICON_WARNING)==wx.YES:
+ addonDir = os.path.dirname(__file__)
+ placeMarkersPath = os.path.join(addonDir, "globalPlugins",
"placeMarkers", "savedPlaceMarkers")
try:
- shutil.copytree(addonPath, savePath)
+ shutil.copytree(addonPath, placeMarkersPath)
except IOError:
pass
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.