diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-23 22:40:10 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-23 22:40:10 +0000 |
| commit | 8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8 (patch) | |
| tree | 598923b2b554aeaf77457a83c399c616a7ecc162 /share | |
| parent | Remove unnecesatry text parameter (diff) | |
| parent | fix nodes reverting back during editing (diff) | |
| download | inkscape-8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8.tar.gz inkscape-8a7004fa550bb1d5eff8ca6ce716b391ea8d9ff8.zip | |
Add fixes sugested by Martin Owens
(bzr r15392.1.7)
Diffstat (limited to 'share')
| -rwxr-xr-x | share/extensions/dxf_outlines.py | 2 | ||||
| -rwxr-xr-x | share/extensions/hpgl_input.py | 2 | ||||
| -rwxr-xr-x | share/extensions/measure.py | 3 | ||||
| -rwxr-xr-x | share/extensions/perspective.py | 2 | ||||
| -rwxr-xr-x | share/extensions/polyhedron_3d.py | 3 | ||||
| -rwxr-xr-x | share/extensions/run_command.py | 7 | ||||
| -rwxr-xr-x | share/extensions/test/run-all-extension-tests | 27 | ||||
| -rwxr-xr-x | share/extensions/uniconv-ext.py | 3 | ||||
| -rwxr-xr-x | share/extensions/uniconv_output.py | 3 | ||||
| -rw-r--r-- | share/keys/default.xml | 2 | ||||
| -rw-r--r-- | share/keys/inkscape.xml | 1 |
11 files changed, 40 insertions, 15 deletions
diff --git a/share/extensions/dxf_outlines.py b/share/extensions/dxf_outlines.py index 525461bde..a387df4a1 100755 --- a/share/extensions/dxf_outlines.py +++ b/share/extensions/dxf_outlines.py @@ -44,6 +44,8 @@ try: from numpy import * from numpy.linalg import solve except: + # Initialize gettext for messages outside an inkex derived class + inkex.localize() inkex.errormsg(_("Failed to import the numpy or numpy.linalg modules. These modules are required by this extension. Please install them and try again.")) inkex.sys.exit() diff --git a/share/extensions/hpgl_input.py b/share/extensions/hpgl_input.py index 2b275cbf8..13d6d00ec 100755 --- a/share/extensions/hpgl_input.py +++ b/share/extensions/hpgl_input.py @@ -26,6 +26,8 @@ import hpgl_decoder import inkex import sys +inkex.localize() + # parse options parser = inkex.optparse.OptionParser(usage='usage: %prog [options] HPGLfile', option_class=inkex.InkOption) parser.add_option('--resolutionX', action='store', type='float', dest='resolutionX', default=1016.0, help='Resolution X (dpi)') diff --git a/share/extensions/measure.py b/share/extensions/measure.py index b605ffe93..d025f142c 100755 --- a/share/extensions/measure.py +++ b/share/extensions/measure.py @@ -51,6 +51,9 @@ try: except locale.Error: locale.setlocale(locale.LC_ALL, 'C') +# Initialize gettext for messages outside an inkex derived class +inkex.localize() + # third party try: import numpy diff --git a/share/extensions/perspective.py b/share/extensions/perspective.py index ea08b98dc..f15deaad5 100755 --- a/share/extensions/perspective.py +++ b/share/extensions/perspective.py @@ -39,6 +39,8 @@ try: from numpy import * from numpy.linalg import * except: + # Initialize gettext for messages outside an inkex derived class + inkex.localize() inkex.errormsg(_("Failed to import the numpy or numpy.linalg modules. These modules are required by this extension. Please install them and try again. On a Debian-like system this can be done with the command, sudo apt-get install python-numpy.")) exit() diff --git a/share/extensions/polyhedron_3d.py b/share/extensions/polyhedron_3d.py index 86203d4bc..a74a64e69 100755 --- a/share/extensions/polyhedron_3d.py +++ b/share/extensions/polyhedron_3d.py @@ -57,6 +57,9 @@ import inkex import simplestyle from simpletransform import computePointInNode +# Initialize gettext for messages outside an inkex derived class +inkex.localize() + # third party try: from numpy import * diff --git a/share/extensions/run_command.py b/share/extensions/run_command.py index 7012c4274..950e9ed7c 100755 --- a/share/extensions/run_command.py +++ b/share/extensions/run_command.py @@ -61,8 +61,11 @@ def run(command_format, prog_name): except ImportError: # shouldn't happen... msg = "Neither subprocess.Popen nor popen2.Popen3 is available" - if rc and msg is None: - msg = "%s failed:\n%s\n%s\n" % (prog_name, out, err) + if msg is None: + if rc: + msg = "%s failed:\n%s\n%s\n" % (prog_name, out, err) + elif err: + sys.stderr.write("%s executed but logged the following error:\n%s\n%s\n" % (prog_name, out, err)) except Exception, inst: msg = "Error attempting to run %s: %s" % (prog_name, str(inst)) diff --git a/share/extensions/test/run-all-extension-tests b/share/extensions/test/run-all-extension-tests index e7faf672a..ff739c311 100755 --- a/share/extensions/test/run-all-extension-tests +++ b/share/extensions/test/run-all-extension-tests @@ -38,20 +38,25 @@ failed_tests=$( $MKTEMP ) if coverage.py erase >/dev/null 2>/dev/null; then has_py_coverage=true cover_py_cmd=coverage.py -else - if coverage erase >/dev/null 2>/dev/null; then - has_py_coverage=true - cover_py_cmd=coverage - else - if python-coverage erase >/dev/null 2>/dev/null; then - has_py_coverage=true - cover_py_cmd=python-coverage - fi - fi + else + if coverage erase >/dev/null 2>/dev/null; then + has_py_coverage=true + cover_py_cmd=coverage + else + if python-coverage erase >/dev/null 2>/dev/null; then + has_py_coverage=true + cover_py_cmd=python-coverage + else + if coverage-script.py erase >/dev/null 2>/dev/null; then + has_py_coverage=true + cover_py_cmd=coverage-script.py + fi + fi + fi fi if $has_py_coverage; then - echo -e "\nRunning tests with coverage" + echo -e "\nRunning tests with coverage (${cover_py_cmd})" fi #if $has_py_coverage; then # $cover_py_cmd -e diff --git a/share/extensions/uniconv-ext.py b/share/extensions/uniconv-ext.py index c84ee2e0a..6ce0d7fab 100755 --- a/share/extensions/uniconv-ext.py +++ b/share/extensions/uniconv-ext.py @@ -51,7 +51,8 @@ if cmd == None: import imp imp.find_module("uniconvertor") except ImportError: - sys.stderr.write(_('You need to install the UniConvertor software.\n'+\ + inkex.localize() + inkex.errormsg(_('You need to install the UniConvertor software.\n'+\ 'For GNU/Linux: install the package python-uniconvertor.\n'+\ 'For Windows: download it from\n'+\ 'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\ diff --git a/share/extensions/uniconv_output.py b/share/extensions/uniconv_output.py index 7815137b6..a02a16d95 100755 --- a/share/extensions/uniconv_output.py +++ b/share/extensions/uniconv_output.py @@ -118,7 +118,8 @@ def get_command(): import imp imp.find_module("uniconvertor") except ImportError: - sys.stderr.write(_('You need to install the UniConvertor software.\n'+\ + inkex.localize() + inkex.errormsg(_('You need to install the UniConvertor software.\n'+\ 'For GNU/Linux: install the package python-uniconvertor.\n'+\ 'For Windows: download it from\n'+\ 'http://sk1project.org/modules.php?name=Products&product=uniconvertor\n'+\ diff --git a/share/keys/default.xml b/share/keys/default.xml index 581716d12..134251752 100644 --- a/share/keys/default.xml +++ b/share/keys/default.xml @@ -383,6 +383,8 @@ override) the bindings in the main default.xml. <bind key="7" action="EditNextPathEffectParameter" display="true" /> + <bind action="EditSwapFillStroke" display="true" /> + <bind key="r" modifiers="Ctrl,Shift" action="FitCanvasToSelectionOrDrawing" display="true" /> <bind key="R" modifiers="Ctrl,Shift" action="FitCanvasToSelectionOrDrawing" display="true" /> diff --git a/share/keys/inkscape.xml b/share/keys/inkscape.xml index 581716d12..4461dee69 100644 --- a/share/keys/inkscape.xml +++ b/share/keys/inkscape.xml @@ -382,6 +382,7 @@ override) the bindings in the main default.xml. <bind key="Escape" action="EditDeselect" /> <bind key="7" action="EditNextPathEffectParameter" display="true" /> + <bind action="EditSwapFillStroke" display="true" /> <bind key="r" modifiers="Ctrl,Shift" action="FitCanvasToSelectionOrDrawing" display="true" /> <bind key="R" modifiers="Ctrl,Shift" action="FitCanvasToSelectionOrDrawing" display="true" /> |
