2 new commits in clipContentsDesigner:
https://bitbucket.org/nvdaaddonteam/clipcontentsdesigner/commits/f134d9939cae/
Changeset: f134d9939cae
Branch: None
User: norrumar
Date: 2016-06-09 05:54:30+00:00
Summary: Added configspec with a default value for the separator.
Affected #: 1 file
diff --git a/addon/globalPlugins/clipContentsDesigner/__init__.py
b/addon/globalPlugins/clipContentsDesigner/__init__.py
index 1a3cafa..08e8e83 100644
--- a/addon/globalPlugins/clipContentsDesigner/__init__.py
+++ b/addon/globalPlugins/clipContentsDesigner/__init__.py
@@ -1,5 +1,7 @@
# clipContentsDesigner: a global plugin for managing clipboard text
# Version: 4.0
+# Added configspec
+# Date: 09/06/2016
# Settings managed from config.conf of NVDA core
# Date: 02/06/2016
# Version: 3.0
@@ -45,6 +47,8 @@ import config
import wx
import gui
from gui import SettingsDialog
+from configobj import ConfigObj
+from cStringIO import StringIO
addonHandler.initTranslation()
@@ -53,11 +57,13 @@ try:
except:
SCRCAT_TEXTREVIEW = SCRCAT_CONFIG = None
+confspec = ConfigObj(StringIO("""
+separator = string(default="")
+"""))
+config.conf.spec["clipContentsDesigner"] = confspec
+
def getBookmark():
- try:
- separator = config.conf["clipContentsDesigner"]["separator"]
- except KeyError:
- separator = None
+ separator = config.conf["clipContentsDesigner"]["separator"]
if not separator:
bookmark = "\r\n"
else:
@@ -194,12 +200,9 @@ class AddonSettingsDialog(SettingsDialog):
def makeSettings(self, settingsSizer):
# Translators: label of a dialog.
setSeparatorLabel=wx.StaticText(self, -1, label=_("Type the
string to be used as a &separator between contents appended to the clipboard."))
- settingsSizer.Add(setSeparatorLabel)
self.setSeparatorEdit=wx.TextCtrl(self, wx.NewId())
- try:
-
self.setSeparatorEdit.SetValue(config.conf["clipContentsDesigner"]["separator"])
- except KeyError:
- pass
+ settingsSizer.Add(setSeparatorLabel)
+
self.setSeparatorEdit.SetValue(config.conf["clipContentsDesigner"]["separator"])
settingsSizer.Add(self.setSeparatorEdit, border=10,
flag=wx.BOTTOM)
def postInit(self):
@@ -207,4 +210,4 @@ class AddonSettingsDialog(SettingsDialog):
def onOk(self,evt):
super(AddonSettingsDialog, self).onOk(evt)
- config.conf["clipContentsDesigner"] = {"separator":
self.setSeparatorEdit.GetValue()}
+ config.conf["clipContentsDesigner"]["separator"] =
self.setSeparatorEdit.GetValue()
https://bitbucket.org/nvdaaddonteam/clipcontentsdesigner/commits/9f5ee9f9885e/
Changeset: 9f5ee9f9885e
Branch: master
User: norrumar
Date: 2016-06-09 06:00:39+00:00
Summary: Bump version: 4.1-dev.
Affected #: 1 file
diff --git a/buildVars.py b/buildVars.py
index ef858d6..96ab31e 100644
--- 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 managing clipboard text."""),
# version
- "addon_version" : "4.0-dev",
+ "addon_version" : "4.1-dev",
# Author(s)
"addon_author" : u"Noelia Ruiz Martínez <nrm1977@xxxxxxxxx>",
# URL for the add-on documentation support
Repository URL: https://bitbucket.org/nvdaaddonteam/clipcontentsdesigner/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.