2 new commits in clipContentsDesigner:
https://bitbucket.org/nvdaaddonteam/clipcontentsdesigner/commits/6bed3474d999/
Changeset: 6bed3474d999
Branch: None
User: norrumar
Date: 2018-12-04 05:20:53+00:00
Summary: Use core.callLater instead of wx.CallLater
Prevents issues fixed in
https://github.com/nvaccess/nvda/pull/8818
Affected #: 1 file
diff --git a/addon/globalPlugins/clipContentsDesigner/__init__.py
b/addon/globalPlugins/clipContentsDesigner/__init__.py
index a49646a..83c3ce1 100644
--- a/addon/globalPlugins/clipContentsDesigner/__init__.py
+++ b/addon/globalPlugins/clipContentsDesigner/__init__.py
@@ -11,6 +11,7 @@ import ui
import win32clipboard
import treeInterceptorHandler
import config
+import core
import wx
import gui
from gui import SettingsPanel, NVDASettingsDialog, guiHelper
@@ -165,10 +166,10 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
_("Adding text to clipboard"), wx.OK|wx.CANCEL) ==
wx.OK:
if api.copyToClip(text):
# Translators: message presented when
the text has been added to the clipboard.
- wx.CallLater(200, ui.message,
_("Added"))
+ core.callLater(200, ui.message,
_("Added"))
else:
# Translators: message presented when
the text cannot be added to the clipboard.
- wx.CallLater(200, ui.message, _("Cannot
add"))
+ core.callLater(200, ui.message,
_("Cannot add"))
def performAdd(self):
text = self.getTextToAdd()
@@ -198,10 +199,10 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
win32clipboard.OpenClipboard()
win32clipboard.EmptyClipboard()
# Translators: message presented when the clipboard
content has been deleted.
- wx.CallLater(200, ui.message, _("Clipboard cleared"))
+ core.callLater(200, ui.message, _("Clipboard cleared"))
except win32clipboard.error:
# Translators: message presented when the clipboard
content cannot be deleted.
- wx.CallLater(200, ui.message, _("Clipboard not
cleared"))
+ core.callLater(200, ui.message, _("Clipboard not
cleared"))
finally:
win32clipboard.CloseClipboard()
@@ -232,7 +233,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
if text:
api.copyToClip(text)
else:
- wx.CallLater(200, self.copy)
+ core.callLater(200, self.copy)
def script_copy(self, gesture):
if (config.conf["clipContentsDesigner"]["confirmToCopy"] and
not gui.isInMessageBox
@@ -252,7 +253,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
# Translators: Title of a dialog.
_("Cutting from clipboard"), wx.OK|wx.CANCEL) != wx.OK:
return
- wx.CallLater(200, self.cut)
+ core.callLater(200, self.cut)
def script_cut(self, gesture):
if (config.conf["clipContentsDesigner"]["confirmToCut"] and not
gui.isInMessageBox
https://bitbucket.org/nvdaaddonteam/clipcontentsdesigner/commits/6cf10d85bc7a/
Changeset: 6cf10d85bc7a
Branch: stable
User: norrumar
Date: 2018-12-04 05:27:16+00:00
Summary: Bump version: 8.6
sconstruct modified to make translated add-on summary available to be used in
readme, thanks to @abdel792
Affected #: 2 files
diff --git a/buildVars.py b/buildVars.py
index c55d3b6..8987277 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" : "8.5",
+ "addon_version" : "8.6",
# Author(s)
"addon_author" : u"Noelia Ruiz Martínez <nrm1977@xxxxxxxxx>",
# URL for the add-on documentation support
diff --git a/sconstruct b/sconstruct
index c28510b..1ddaf68 100644
--- a/sconstruct
+++ b/sconstruct
@@ -15,7 +15,12 @@ import buildVars
def md2html(source, dest):
import markdown
lang = os.path.basename(os.path.dirname(source)).replace('_', '-')
- title="{addonSummary}
{addonVersion}".format(addonSummary=buildVars.addon_info["addon_summary"],
addonVersion=buildVars.addon_info["addon_version"])
+ localeLang = os.path.basename(os.path.dirname(source))
+ try:
+ _ = gettext.translation("nvda", localedir=os.path.join("addon",
"locale"), languages=[localeLang]).ugettext
+ title=u"{0}".format(_(buildVars.addon_info["addon_summary"]))
+ except:
+ title="{0}".format(buildVars.addon_info["addon_summary"])
headerDic = {
"[[!meta title=\"": "# ",
"\"]]": " #",
@@ -39,20 +44,12 @@ def md2html(source, dest):
f.write(htmlText)
f.write("\n</body>\n</html>")
-def mdTool(env):
- mdAction=env.Action(
- lambda target,source,env: md2html(source[0].path,
target[0].path),
- lambda target,source,env: 'Generating %s'%target[0],
- )
- mdBuilder=env.Builder(
- action=mdAction,
- suffix='.html',
- src_suffix='.md',
- )
- env['BUILDERS']['markdown']=mdBuilder
-
+def generateHelpFiles (source, target, env, for_signature):
+ action = env.Action(lambda target, source, env :
md2html(source[0].abspath, target[0].abspath) and None,
+ lambda target, source, env : "Generating %s" % target[0])
+ return action
-env = Environment(ENV=os.environ, tools=['gettexttool', mdTool])
+env = Environment(ENV=os.environ, tools=['gettexttool'])
env.Append(**buildVars.addon_info)
addonFile = env.File("${addon_name}-${addon_version}.nvda-addon")
@@ -76,6 +73,9 @@ def translatedManifestGenerator(target, source, env,
for_signature):
return action
env['BUILDERS']['NVDAAddon'] = Builder(generator=addonGenerator)
+env['BUILDERS']['markdown']=Builder(generator = generateHelpFiles,
+ suffix='.html',
+ src_suffix='.md')
env['BUILDERS']['NVDAManifest'] = Builder(generator=manifestGenerator)
env['BUILDERS']['NVDATranslatedManifest'] =
Builder(generator=translatedManifestGenerator)
@@ -128,28 +128,10 @@ def expandGlobs(files):
addon = env.NVDAAddon(addonFile, env.Dir('addon'))
-langDirs = [f for f in env.Glob(os.path.join("addon", "locale", "*"))]
-
-#Allow all NVDA's gettext po files to be compiled in source/locale, and
manifest files to be generated
-for dir in langDirs:
- poFile = dir.File(os.path.join("LC_MESSAGES", "nvda.po"))
- moFile=env.gettextMoFile(poFile)
- env.Depends(moFile, poFile)
- translatedManifest =
env.NVDATranslatedManifest(dir.File("manifest.ini"), [moFile,
os.path.join("manifest-translated.ini.tpl")])
- env.Depends(translatedManifest, ["buildVars.py"])
- env.Depends(addon, [translatedManifest, moFile])
-
pythonFiles = expandGlobs(buildVars.pythonSources)
for file in pythonFiles:
env.Depends(addon, file)
-#Convert markdown files to html
-createAddonHelp("addon") # We need at least doc in English and should enable
the Help button for the add-on in Add-ons Manager
-for mdFile in env.Glob(os.path.join('addon', 'doc', '*', '*.md')):
- htmlFile = env.markdown(mdFile)
- env.Depends(htmlFile, mdFile)
- env.Depends(addon, htmlFile)
-
# Pot target
i18nFiles = expandGlobs(buildVars.i18nSources)
gettextvars={
@@ -171,4 +153,20 @@ manifest = env.NVDAManifest(os.path.join("addon",
"manifest.ini"), os.path.join(
env.Depends(manifest, "buildVars.py")
env.Depends(addon, manifest)
+createAddonHelp("addon") # We need at least doc in English and should enable
the Help button for the add-on in Add-ons Manager
+langDirs = [f for f in env.Glob(os.path.join("addon", "locale", "*"))]
+
+#Allow all NVDA's gettext po files to be compiled in source/locale, and
manifest files to be generated
+for dir in langDirs:
+ poFile = dir.File(os.path.join("LC_MESSAGES", "nvda.po"))
+ moFile=env.gettextMoFile(poFile)
+ env.Depends(moFile, poFile)
+ translatedManifest =
env.NVDATranslatedManifest(dir.File("manifest.ini"), [moFile,
os.path.join("manifest-translated.ini.tpl")])
+ env.Depends(translatedManifest, ["buildVars.py"])
+ env.Depends(addon, [translatedManifest, moFile])
+ #Convert markdown files to html
+ for mdFile in env.Glob(os.path.join('addon', 'doc', '*', '*.md')):
+ htmlFile = env.markdown(mdFile)
+ env.Depends(htmlFile, [mdFile, moFile])
+ env.Depends(addon, htmlFile)
env.Default(addon)
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.