diff options
| author | Jabiertxof <jtx@jtx> | 2017-01-14 22:33:43 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx> | 2017-01-14 22:33:43 +0000 |
| commit | b9df198f666e6efc79a603d2d0bf276c8ab1d6b4 (patch) | |
| tree | 82d31550313a81c746bf6cce75a87827911a3709 /share/extensions | |
| parent | Update to trunk (diff) | |
| parent | [Bug #1654892] Few typos in Calligraphy tutorial. (diff) | |
| download | inkscape-b9df198f666e6efc79a603d2d0bf276c8ab1d6b4.tar.gz inkscape-b9df198f666e6efc79a603d2d0bf276c8ab1d6b4.zip | |
Update to trunk
(bzr r15295.1.62)
Diffstat (limited to 'share/extensions')
| -rwxr-xr-x | share/extensions/draw_from_triangle.py | 19 | ||||
| -rwxr-xr-x | share/extensions/interp.py | 4 | ||||
| -rwxr-xr-x | share/extensions/plotter.py | 2 |
3 files changed, 13 insertions, 12 deletions
diff --git a/share/extensions/draw_from_triangle.py b/share/extensions/draw_from_triangle.py index 3146fe26e..fd966b1d1 100755 --- a/share/extensions/draw_from_triangle.py +++ b/share/extensions/draw_from_triangle.py @@ -176,16 +176,17 @@ def cot(x):#cotangent(x) def report_properties( params ):#report to the Inkscape console using errormsg # TODO: unit identifier needs solution for arbitrary document scale unit = Draw_From_Triangle.getDocumentUnit(e) - inkex.errormsg(_("Side Length 'a' (" + unit + "): " + str( params[0][0] ) )) - inkex.errormsg(_("Side Length 'b' (" + unit + "): " + str( params[0][1] ) )) - inkex.errormsg(_("Side Length 'c' (" + unit + "): " + str( params[0][2] ) )) - inkex.errormsg(_("Angle 'A' (radians): " + str( params[1][0] ) )) - inkex.errormsg(_("Angle 'B' (radians): " + str( params[1][1] ) )) - inkex.errormsg(_("Angle 'C' (radians): " + str( params[1][2] ) )) - inkex.errormsg(_("Semiperimeter (px): " + str( params[4][1] ) )) - inkex.errormsg(_("Area ("+ unit + "^2): " + str( params[4][0] ) )) + + inkex.errormsg(_("Side Length 'a' ({0}): {1}").format(unit, str(params[0][0])) ) + inkex.errormsg(_("Side Length 'b' ({0}): {1}").format(unit, str(params[0][1])) ) + inkex.errormsg(_("Side Length 'c' ({0}): {1}").format(unit, str(params[0][2])) ) + inkex.errormsg(_("Angle 'A' (radians): {}").format(str(params[1][0])) ) + inkex.errormsg(_("Angle 'B' (radians): {}").format(str(params[1][1])) ) + inkex.errormsg(_("Angle 'C' (radians): {}").format(params[1][2]) ) + inkex.errormsg(_("Semiperimeter (px): {}").format(params[4][1]) ) + inkex.errormsg(_("Area ({0}^2): {1}").format(unit, str(params[4][0])) ) return - + class Style(object): #container for style information def __init__(self, options): diff --git a/share/extensions/interp.py b/share/extensions/interp.py index a53ab07d9..fd80ab412 100755 --- a/share/extensions/interp.py +++ b/share/extensions/interp.py @@ -110,8 +110,8 @@ class Interp(inkex.Effect): def tweenstyleunit(self, property, start, end, time): # moved here so we can call 'unittouu' scale = self.unittouu('1px') - sp = self.unittouu(start[property]) / scale - ep = self.unittouu(end[property]) / scale + sp = self.unittouu(start.get(property, '1px')) / scale + ep = self.unittouu(end.get(property, '1px')) / scale return str(sp + (time * (ep - sp))) def effect(self): diff --git a/share/extensions/plotter.py b/share/extensions/plotter.py index 8a14d55bc..800142bb2 100755 --- a/share/extensions/plotter.py +++ b/share/extensions/plotter.py @@ -196,7 +196,7 @@ class Plot(inkex.Effect): try: mySerial.open() except Exception as inst: - if 'ould not open port' in inst.args[0]: + if 'ould not open port' in inst.strerror: inkex.errormsg(_("Could not open port. Please check that your plotter is running, connected and the settings are correct.")) return else: |
