Code

Updated the JessyInk extensions to version 1.5.5.
authorHannes Hochreiner <hannes@hochreiner.net>
Sun, 7 Nov 2010 11:45:29 +0000 (12:45 +0100)
committerHannes Hochreiner <hannes@hochreiner.net>
Sun, 7 Nov 2010 11:45:29 +0000 (12:45 +0100)
share/extensions/jessyInk.js
share/extensions/jessyInk_autoTexts.py
share/extensions/jessyInk_effects.py
share/extensions/jessyInk_install.py
share/extensions/jessyInk_keyBindings.py
share/extensions/jessyInk_masterSlide.py
share/extensions/jessyInk_mouseHandler.py
share/extensions/jessyInk_summary.py
share/extensions/jessyInk_transitions.py
share/extensions/jessyInk_video.py
share/extensions/jessyInk_view.py

index 0e568300829f7f954671ce2c952c63d32935a438..78b4bf8962be37bf9d258bf41dc074913c3ebf13 100755 (executable)
@@ -1373,6 +1373,18 @@ function slideUpdateExportLayer()
        {
                var nd = nodesToBeRemoved[ndCounter];
 
+               // Before removing the node, check whether it contains any definitions.
+               var defs = nd.getElementsByTagNameNS(NSS["svg"], "defs");
+
+               for (var defsCounter = 0; defsCounter < defs.length; defsCounter++)
+               {
+                       if (defs[defsCounter].id)
+                       {
+                               newDoc.appendChild(defs[defsCounter].cloneNode(true));
+                       }
+               }
+
+               // Remove node.
                nd.parentNode.removeChild(nd);
        }
 
@@ -1418,7 +1430,7 @@ function slideUpdateExportLayer()
 
        var xml = serializer.serializeToStream(newDoc, strm, 'UTF-8');
 
-       window.open('data:image/svg+xml;base64;charset=utf-8,' + window.btoa(strm.content), '_blank');
+       window.location = 'data:application/svg+xml;base64;charset=utf-8,' + window.btoa(strm.content);
 
        // Unsuspend redraw.
        ROOT_NODE.unsuspendRedraw(suspendHandle);
index 57566888f8dd3654a37cfe80785a887af7a2f08b..cf41ad24f5c6c2fc7a60d67631e3b4bfdbd684b6 100755 (executable)
@@ -40,7 +40,7 @@ class JessyInk_AutoTexts(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index 336d0ee4e9dfce6dc3667080a2bf1b78ee31cbd1..3af909bb25d2ac0244baa3c9e0871ecf89d25752 100755 (executable)
@@ -45,7 +45,7 @@ class JessyInk_Effects(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index 331b2d232e913691c78778cb32f1a5696d58c8d3..f1e951ec665e7d1ec4628d2d7338515adbabdbc4 100755 (executable)
@@ -60,7 +60,7 @@ class JessyInk_Install(inkex.Effect):
                scriptElm = inkex.etree.Element(inkex.addNS("script", "svg"))
                scriptElm.text = open(os.path.join(os.path.dirname(__file__),   "jessyInk.js")).read()
                scriptElm.set("id","JessyInk")
-               scriptElm.set("{" + inkex.NSS["jessyink"] + "}version", '1.5.4')
+               scriptElm.set("{" + inkex.NSS["jessyink"] + "}version", '1.5.5')
                self.document.getroot().append(scriptElm)
 
                # Remove "jessyInkInit()" in the "onload" attribute, if present.
index 3f2ed34e9edface5fa1926276c43f13601974393..110ca335552f2632146b53b0bc1a2a520f123ff6 100755 (executable)
@@ -182,7 +182,7 @@ class       JessyInk_CustomKeyBindings(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index 41f0f8c7134080b737ad38d898c71cd7932f708c..c29922d9412bb0c93a440600a3a5f54a8852f64e 100755 (executable)
@@ -40,7 +40,7 @@ class JessyInk_MasterSlide(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index f35a65bf55661440bce70a31e95d4617bef3b828..4eff4c467b5d2244ad370d2b84209b92af586ccb 100755 (executable)
@@ -42,7 +42,7 @@ class JessyInk_CustomMouseHandler(inkex.Effect):
                
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index f4b3d8d3815840591476dd6ba6a74073c4655936..48478c41e3981ed7a1c5799253c99c5e07dd8247 100755 (executable)
@@ -58,7 +58,7 @@ class JessyInk_Summary(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index 77953216876b4e52d2a720f3e9b61898ae1758f3..18cd3f8808cf2ffdd17a169c1e636dadc5f1e46a 100755 (executable)
@@ -44,7 +44,7 @@ class JessyInk_Transitions(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index 222670b35fe4f9ada3a8371a28079c3519136aed..51c73494b4597a7a5ed2d584cd141ee92d664eb2 100755 (executable)
@@ -43,7 +43,7 @@ class JessyInk_Effects(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))
index ba9c4a6867101a74bbe6cad90828c3dbc5ea2f1d..04adc27ae9a46f79a218eb911ad28ca87ebb0144 100755 (executable)
@@ -61,7 +61,7 @@ class JessyInk_Effects(inkex.Effect):
 
        def effect(self):
                # Check version.
-               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.4']", namespaces=inkex.NSS)
+               scriptNodes = self.document.xpath("//svg:script[@jessyink:version='1.5.5']", namespaces=inkex.NSS)
 
                if len(scriptNodes) != 1:
                        inkex.errormsg(_("The JessyInk script is not installed in this SVG file or has a different version than the JessyInk extensions. Please select \"install/update...\" from the \"JessyInk\" sub-menu of the \"Extensions\" menu to install or update the JessyInk script.\n\n"))