Code

Extensions. Consistency fix and UI improvements (Text, Path and Web submenus).
authorJazzyNico <nicoduf@yahoo.fr>
Thu, 9 Sep 2010 18:59:23 +0000 (20:59 +0200)
committerJazzyNico <nicoduf@yahoo.fr>
Thu, 9 Sep 2010 18:59:23 +0000 (20:59 +0200)
14 files changed:
po/fr.po
share/extensions/dimension.inx
share/extensions/lorem_ipsum.inx
share/extensions/lorem_ipsum.py
share/extensions/measure.inx
share/extensions/split.inx
share/extensions/split.py
share/extensions/web-set-att.inx
share/extensions/web-set-att.py
share/extensions/web-transmit-att.inx
share/extensions/web-transmit-att.py
share/extensions/webslicer_create_group.inx
share/extensions/webslicer_create_group.py
share/extensions/webslicer_export.inx

index 28bad2f81ec40c72807379666a22d581d6c67231..eaefb26a710067297c1e0471ca4e07bd05e3136e 100644 (file)
--- a/po/fr.po
+++ b/po/fr.po
@@ -3558,7 +3558,7 @@ msgstr "Unité de hauteur :"
 
 #: ../share/extensions/webslicer_create_group.inx.h:5
 msgid "Layout Group is only about to help a better code generation (if you need it). To use this, you must to select some \"Slicer rectangles\" first."
-msgstr "Le but du groupe de composants est d’aider à générer un meilleur code (si nécessaire). Pour l’utiliser, vous devez d’abord sélectionner des « Rectangles de découpe »."
+msgstr "Le but du groupe de composants est d’aider à générer un meilleur code (si nécessaire). Pour l’utiliser, vous devez d’abord sélectionner des « Rectangles de découpe »."
 
 #: ../share/extensions/webslicer_create_group.inx.h:6
 msgid "Percent (relative to parent size)"
index cce244d4aa79c63e86c1e09633585cb76e1a426c..343ad27bff7ce2cba00a1f4144d016619e34961b 100644 (file)
@@ -5,11 +5,11 @@
        <dependency type="executable" location="extensions">dimension.py</dependency>
        <dependency type="executable" location="extensions">inkex.py</dependency>
        <dependency type="executable" location="extensions">pathmodifier.py</dependency>
-       <param name="xoffset" type="float" min="0" max="1000" _gui-text="X Offset">50</param>
-       <param name="yoffset" type="float" min="0" max="1000" _gui-text="Y Offset">50</param>
-       <param name="type" type="optiongroup" _gui-text="Bounding box type : ">
-               <_option value="geometric">Geometric</_option>
-               <_option value="visual">Visual</_option>
+       <param name="xoffset" type="float" min="0" max="1000" _gui-text="X Offset:">50</param>
+       <param name="yoffset" type="float" min="0" max="1000" _gui-text="Y Offset:">50</param>
+       <param name="type" type="enum" _gui-text="Bounding box type :">
+               <_item value="geometric">Geometric</_item>
+               <_item value="visual">Visual</_item>
        </param>
        <effect>
                <object-type>path</object-type>
index b36ff079e2681b0da4510172361b07639e7f76e8..2833af16c92f4580c67fb8cee4587ba0be632088 100644 (file)
@@ -4,10 +4,16 @@
        <id>com.kaioa.lorem_ipsum</id>
        <dependency type="executable" location="extensions">lorem_ipsum.py</dependency>
        <dependency type="executable" location="extensions">inkex.py</dependency>
-  <_param name="title" type="description">This effect creates the standard "Lorem Ipsum" pseudolatin placeholder text. If a flowed text is selected, Lorem Ipsum is added to it; otherwise a new flowed text object, the size of the page, is created in a new layer.</_param>
-       <param name="num" type="int" min="1" max="1000" _gui-text="Number of paragraphs">5</param>
-       <param name="sentencecount" type="int" min="2" max="100" _gui-text="Sentences per paragraph">16</param>
-       <param name="fluctuation" type="int" min="1" max="100" _gui-text="Paragraph length fluctuation (sentences)">4</param>
+       <param name="tab" type="notebook">
+        <page name="Options" _gui-text="Options">
+               <param name="num" type="int" min="1" max="1000" _gui-text="Number of paragraphs:">5</param>
+               <param name="sentencecount" type="int" min="2" max="100" _gui-text="Sentences per paragraph:">16</param>
+               <param name="fluctuation" type="int" min="1" max="100" _gui-text="Paragraph length fluctuation (sentences):">4</param>
+        </page>
+        <page name="Help" _gui-text="Help">
+            <_param name="title" type="description">This effect creates the standard "Lorem Ipsum" pseudolatin placeholder text. If a flowed text is selected, Lorem Ipsum is added to it; otherwise a new flowed text object, the size of the page, is created in a new layer.</_param>
+        </page>
+    </param>
     <effect>
         <object-type>all</object-type>
         <effects-menu>
index 52d1bb190cc6da6acd3d93ab6e6399cc2bb8c02a..20a2fdd1836d86f1457f15a2be7ffbff64bcaeb7 100644 (file)
@@ -189,6 +189,11 @@ class MyEffect(inkex.Effect):
       action="store", type="int", 
       dest="fluctuation", default=4,
       help="+/-")
+    self.OptionParser.add_option("--tab",
+      action="store", type="string",
+      dest="tab",
+      help="The selected UI-tab when OK was pressed")
+
     self.first_sentence = 1
 
   def makePara(self):
index af325a00e4aad8b4b898692e89f5186cd9a6e47f..264e33ab667693dcf81c1eda498ab3a247869434 100644 (file)
                                <_item value="length">Length</_item>
                                <_item value="area">Area</_item>
                        </param>
-                       <param name="fontsize" type="int" min="1" max="1000" _gui-text="Font size [px]">12</param>
-                       <param name="offset" type="float" min="-10000" max="10000" _gui-text="Offset [px]">-6</param>
-                       <param name="precision" type="int" min="0" max="25" _gui-text="Precision">2</param>
+                       <param name="fontsize" type="int" min="1" max="1000" _gui-text="Font size (px):">12</param>
+                       <param name="offset" type="float" min="-10000" max="10000" _gui-text="Offset (px):">-6</param>
+                       <param name="precision" type="int" min="0" max="25" _gui-text="Precision:">2</param>
                        <param name="scale" type="float" min="1e-8" max="1e10" _gui-text="Scale Factor (Drawing:Real Length) = 1:">1</param>
                        <!--<param name="orient" type="boolean" _gui-text="Keep text orientation upright">true</param>-->
                        <!--<param name="unit" type="string" _gui-text="Unit {km|m|cm|mm|in|px|pt}">mm</param>-->
-                       <param name="unit" type="enum" _gui-text="Length Unit: ">
+                       <param name="unit" type="enum" _gui-text="Length Unit:">
                                <item value="px">px</item>
                                <item value="pt">pt</item>
                                <item value="in">in</item>
index ced0cf49547c22b181a704f5253437a5757c012a..63e0fd6ca57b4c5260f36dd485f1fd7417770f05 100644 (file)
@@ -4,13 +4,19 @@
     <id>com.nerdson.split</id>
        <dependency type="executable" location="extensions">split.py</dependency>
        <dependency type="executable" location="extensions">inkex.py</dependency>
-       <_param name="texthelp" type="description">This effect splits texts into different lines, words or letters. Select below how your text should be splitted.</_param>
-       <param name="splittype" type="enum" _gui-text="Split:">
-               <_item value="line">Lines</_item>
-               <_item value="word">Words</_item>
-               <_item value="letter">Letters</_item>
-       </param>
-       <param name="preserve" type="boolean" _gui-text="Preserve original text?">true</param>
+       <param name="tab" type="notebook">
+        <page name="Options" _gui-text="Options">
+               <param name="splittype" type="enum" _gui-text="Split:">
+                       <_item value="line">Lines</_item>
+                       <_item value="word">Words</_item>
+                       <_item value="letter">Letters</_item>
+               </param>
+               <param name="preserve" type="boolean" _gui-text="Preserve original text">true</param>
+        </page>
+        <page name="Help" _gui-text="Help">
+               <_param name="texthelp" type="description">This effect splits texts into different lines, words or letters.</_param>
+        </page>
+    </param>
     <effect>
                <object-type>text</object-type>
                <effects-menu>
index 5e9de002bfa48d4e1e92a78453491a6607e21bbe..0cbc7b05b3ba29fcd3070194d0cbfaeab47b726f 100644 (file)
@@ -30,7 +30,10 @@ class Split(inkex.Effect):
                         action="store", type="inkbool", 
                         dest="preserve", default="True", 
                         help="Preserve original")
-
+        self.OptionParser.add_option("--tab",
+                        action="store", type="string",
+                        dest="tab",
+                        help="The selected UI-tab when OK was pressed")
 
     def split_lines(self, node):
         """Returns a list of lines"""
index 5bb14d2850c6f06acde81504a88229ef2ed51c46..65b35badaea81ea96e3e21b02b4e3924bd074678 100644 (file)
@@ -1,48 +1,52 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
-  <_name>Set Attributes</_name>
-  <id>org.inkscape.web.set-att</id>
-  <dependency type="executable" location="extensions">web-set-att.py</dependency>
-  <dependency type="executable" location="extensions">inkex.py</dependency>
-  <_param name="intro" type="description">This effect adds a feature visible (or usable) only on a SVG enabled web browser (like Firefox).</_param>
-  <_param name="sep1" type="description">••••••••••••••••••••••••••••••••••••••••••••••••</_param>
-  <_param name="help" type="description">This effect sets one or more attributes in the second selected element, when a defined event occurs on the first selected element.</_param>
-  <_param name="sep2" type="description">••••••••••••••••••••••••••••••••••••••••••••••••</_param>
-  <_param name="help" type="description">If you want to set more than one attribute, you must separate this with a space, and only with a space.</_param>
-  <param name="att" type="string" _gui-text="Attribute to set">fill stroke stroke-width</param>
-  <param name="when" type="enum" _gui-text="When should the set be done?">
-    <_item value="onclick">on click</_item>
-    <_item value="onfocusin">on focus</_item>
-    <_item value="onfocusout">on blur</_item>
-    <_item value="onactivate">on activate</_item>
-    <_item value="onmousedown">on mouse down</_item>
-    <_item value="onmouseup">on mouse up</_item>
-    <_item value="onmouseover">on mouse over</_item>
-    <_item value="onmousemove">on mouse move</_item>
-    <_item value="onmouseout">on mouse out</_item>
-    <_item value="onload">on element loaded</_item>
-  </param>
-  <_param name="help" type="description">The list of values must have the same size as the attributes list.</_param>
-  <param name="val" type="string" _gui-text="Value to set">red black 5px</param>
-  <param name="compatibility" type="enum" _gui-text="Compatibility with previews code to this event">
-    <_item value="append">Run it after</_item>
-    <_item value="prepend">Run it before</_item>
-    <_item value="replace">Replace</_item>
-  </param>
-  <_param name="help" type="description">The next parameter is useful when you select more than two elements</_param>
-  <param name="from-and-to" type="enum" _gui-text="Source and destination of setting">
-    <_item value="g-to-one">All selected ones set an attribute in the last one</_item>
-    <_item value="one-to-g">The first selected sets an attribute in all others</_item>
-  </param>
-  <effect>
+    <_name>Set Attributes</_name>
+    <id>org.inkscape.web.set-att</id>
+    <dependency type="executable" location="extensions">web-set-att.py</dependency>
+    <dependency type="executable" location="extensions">inkex.py</dependency>
+       <param name="tab" type="notebook">
+        <page name="Options" _gui-text="Options">
+            <param name="att" type="string" _gui-text="Attribute to set:">fill stroke stroke-width</param>
+            <param name="when" type="enum" _gui-text="When should the set be done:">
+                <_item value="onclick">on click</_item>
+                <_item value="onfocusin">on focus</_item>
+                <_item value="onfocusout">on blur</_item>
+                <_item value="onactivate">on activate</_item>
+                <_item value="onmousedown">on mouse down</_item>
+                <_item value="onmouseup">on mouse up</_item>
+                <_item value="onmouseover">on mouse over</_item>
+                <_item value="onmousemove">on mouse move</_item>
+                <_item value="onmouseout">on mouse out</_item>
+                <_item value="onload">on element loaded</_item>
+            </param>
+            <_param name="help" type="description">The list of values must have the same size as the attributes list.</_param>
+            <param name="val" type="string" _gui-text="Value to set:">red black 5px</param>
+            <param name="compatibility" type="enum" _gui-text="Compatibility with previews code to this event:">
+                <_item value="append">Run it after</_item>
+                <_item value="prepend">Run it before</_item>
+                <_item value="replace">Replace</_item>
+            </param>
+            <_param name="help" type="description">The next parameter is useful when you select more than two elements</_param>
+            <param name="from-and-to" type="enum" _gui-text="Source and destination of setting:">
+                <_item value="g-to-one">All selected ones set an attribute in the last one</_item>
+                <_item value="one-to-g">The first selected sets an attribute in all others</_item>
+            </param>
+        </page>
+        <page name="Help" _gui-text="Help">
+            <_param name="intro" type="description">This effect adds a feature visible (or usable) only on a SVG enabled web browser (like Firefox).</_param>
+            <_param name="desc1" type="description">This effect sets one or more attributes in the second selected element, when a defined event occurs on the first selected element.</_param>
+            <_param name="desc2" type="description">If you want to set more than one attribute, you must separate this with a space, and only with a space.</_param>
+        </page>
+    </param>
+    <effect>
     <object-type>all</object-type>
-    <effects-menu>
-      <submenu _name="Web">
-        <submenu name="JavaScript"/>
-      </submenu>
-    </effects-menu>
-  </effect>
-  <script>
-    <command reldir="extensions" interpreter="python">web-set-att.py</command>
-  </script>
+        <effects-menu>
+            <submenu _name="Web">
+                <submenu name="JavaScript"/>
+            </submenu>
+        </effects-menu>
+    </effect>
+    <script>
+        <command reldir="extensions" interpreter="python">web-set-att.py</command>
+    </script>
 </inkscape-extension>
index 7878cd20889d0d622bf0967fe841ed4ab7a15f77..65dd5a5b4f354e0bf7d358d4e9921821b9529fcc 100755 (executable)
@@ -44,6 +44,10 @@ class InkWebTransmitAtt(inkwebeffect.InkWebEffect):
                         action="store", type="string",
                         dest="from_and_to", default="g-to-one",
                         help='Who transmit to Who? "g-to-one" All set the last. "one-to-g" The first set all.')
+        self.OptionParser.add_option("--tab",
+                        action="store", type="string",
+                        dest="tab",
+                        help="The selected UI-tab when OK was pressed")
 
     def effect(self):
       self.ensureInkWebSupport()
index caf284b938c87b407ad1581f2e635347a5e2a7c8..343f65f612337b1fff3d85dcad4999b7bd160a32 100644 (file)
@@ -4,43 +4,47 @@
   <id>org.inkscape.web.transmit-att</id>
   <dependency type="executable" location="extensions">web-transmit-att.py</dependency>
   <dependency type="executable" location="extensions">inkex.py</dependency>
-  <_param name="intro" type="description">This effect adds a feature visible (or usable) only on a SVG enabled web browser (like Firefox).</_param>
-  <_param name="sep1" type="description">••••••••••••••••••••••••••••••••••••••••••••••••</_param>
-  <_param name="help" type="description">This effect transmits one or more attributes from the first selected element to the second when an event occurs.</_param>
-  <_param name="sep2" type="description">••••••••••••••••••••••••••••••••••••••••••••••••</_param>
-  <_param name="help" type="description">If you want to transmit more than one attribute, you should separate this with a space, and only with a space.</_param>
-  <param name="att" type="string" _gui-text="Attribute to transmit">fill</param>
-  <param name="when" type="enum" _gui-text="When to transmit">
-    <_item value="onclick">on click</_item>
-    <_item value="onfocusin">on focus</_item>
-    <_item value="onfocusout">on blur</_item>
-    <_item value="onactivate">on activate</_item>
-    <_item value="onmousedown">on mouse down</_item>
-    <_item value="onmouseup">on mouse up</_item>
-    <_item value="onmouseover">on mouse over</_item>
-    <_item value="onmousemove">on mouse move</_item>
-    <_item value="onmouseout">on mouse out</_item>
-    <_item value="onload">on element loaded</_item>
-  </param>
-  <param name="compatibility" type="enum" _gui-text="Compatibility with previews code to this event">
-    <_item value="append">Run it after</_item>
-    <_item value="prepend">Run it before</_item>
-    <_item value="replace">Replace</_item>
-  </param>
-  <_param name="help" type="description">The next parameter is useful when you select more than two elements</_param>
-  <param name="from-and-to" type="enum" _gui-text="Source and destination of transmitting">
-    <_item value="g-to-one">All selected ones transmit to the last one</_item>
-    <_item value="one-to-g">The first selected transmits to all others</_item>
-  </param>
-  <effect>
-    <object-type>all</object-type>
-    <effects-menu>
-      <submenu _name="Web">
-        <submenu name="JavaScript"/>
-      </submenu>
-    </effects-menu>
-  </effect>
-  <script>
-    <command reldir="extensions" interpreter="python">web-transmit-att.py</command>
-  </script>
+       <param name="tab" type="notebook">
+        <page name="Options" _gui-text="Options">
+            <param name="att" type="string" _gui-text="Attribute to transmit:">fill</param>
+            <param name="when" type="enum" _gui-text="When to transmit:">
+                <_item value="onclick">on click</_item>
+                <_item value="onfocusin">on focus</_item>
+                <_item value="onfocusout">on blur</_item>
+                <_item value="onactivate">on activate</_item>
+                <_item value="onmousedown">on mouse down</_item>
+                <_item value="onmouseup">on mouse up</_item>
+                <_item value="onmouseover">on mouse over</_item>
+                <_item value="onmousemove">on mouse move</_item>
+                <_item value="onmouseout">on mouse out</_item>
+                <_item value="onload">on element loaded</_item>
+            </param>
+            <param name="compatibility" type="enum" _gui-text="Compatibility with previews code to this event:">
+                <_item value="append">Run it after</_item>
+                <_item value="prepend">Run it before</_item>
+                <_item value="replace">Replace</_item>
+            </param>
+            <_param name="help" type="description">The next parameter is useful when you select more than two elements</_param>
+            <param name="from-and-to" type="enum" _gui-text="Source and destination of transmitting:">
+                <_item value="g-to-one">All selected ones transmit to the last one</_item>
+                <_item value="one-to-g">The first selected transmits to all others</_item>
+            </param>
+        </page>
+        <page name="Help" _gui-text="Help">
+            <_param name="intro" type="description">This effect adds a feature visible (or usable) only on a SVG enabled web browser (like Firefox).</_param>
+            <_param name="desc1" type="description">This effect transmits one or more attributes from the first selected element to the second when an event occurs.</_param>
+            <_param name="desc2" type="description">If you want to transmit more than one attribute, you should separate this with a space, and only with a space.</_param>
+        </page>
+    </param>
+    <effect>
+        <object-type>all</object-type>
+        <effects-menu>
+            <submenu _name="Web">
+                <submenu name="JavaScript"/>
+            </submenu>
+        </effects-menu>
+    </effect>
+    <script>
+        <command reldir="extensions" interpreter="python">web-transmit-att.py</command>
+    </script>
 </inkscape-extension>
index c597a41f09032bbc266fc9241079fe5fee36e5c5..35f16e145caa3fb2e7752ee4b842f4fc21b10eed 100644 (file)
@@ -40,6 +40,10 @@ class InkWebTransmitAtt(inkwebeffect.InkWebEffect):
                         action="store", type="string",
                         dest="from_and_to", default="g-to-one",
                         help='Who transmit to Who? "g-to-one" All tramsmit to the last. "one-to-g" The first transmit to all.')
+        self.OptionParser.add_option("--tab",
+                        action="store", type="string",
+                        dest="tab",
+                        help="The selected UI-tab when OK was pressed")
 
     def effect(self):
       self.ensureInkWebSupport()
index 2238a0901862ba23cadc0819c64a6071f705af46..aaa327ea76ee21624f4e7bd60deeda0b2ac2e2e8 100644 (file)
@@ -1,33 +1,39 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
-  <_name>Set a layout group</_name>
-  <id>org.inkscape.web.slicer.create-group</id>
-  <dependency type="executable" location="extensions">webslicer_effect.py</dependency>
-  <dependency type="executable" location="extensions">webslicer_create_group.py</dependency>
-  <dependency type="executable" location="extensions">inkex.py</dependency>
-  <_param name="about" type="description">Layout Group is only about to help a better code generation (if you need it). To use this, you must to select some "Slicer rectangles" first.</_param>
-  <param name="html-id" type="string" _gui-text="HTML id attribute:"></param>
-  <param name="html-class" type="string" _gui-text="HTML class attribute:"></param>
-  <param name="width-unity" type="enum" _gui-text="Width unit:">
-    <_item value="px">Pixel (fixed)</_item>
-    <_item value="percent">Percent (relative to parent size)</_item>
-    <_item value="undefined">Undefined (relative to non-floating content size)</_item>
-  </param>
-  <param name="height-unity" type="enum" _gui-text="Height unit:">
-    <_item value="px">Pixel (fixed)</_item>
-    <_item value="percent">Percent (relative to parent size)</_item>
-    <_item value="undefined">Undefined (relative to non-floating content size)</_item>
-  </param>
-  <param name="bg-color" type="string" _gui-text="Background color:"></param>
-  <effect needs-live-preview="false">
-    <object-type>all</object-type>
-    <effects-menu>
-      <submenu _name="Web">
-        <submenu _name="Slicer"/>
-      </submenu>
-    </effects-menu>
-  </effect>
-  <script>
-    <command reldir="extensions" interpreter="python">webslicer_create_group.py</command>
-  </script>
+    <_name>Set a layout group</_name>
+    <id>org.inkscape.web.slicer.create-group</id>
+    <dependency type="executable" location="extensions">webslicer_effect.py</dependency>
+    <dependency type="executable" location="extensions">webslicer_create_group.py</dependency>
+    <dependency type="executable" location="extensions">inkex.py</dependency>
+       <param name="tab" type="notebook">
+        <page name="Options" _gui-text="Options">
+            <param name="html-id" type="string" _gui-text="HTML id attribute:"></param>
+            <param name="html-class" type="string" _gui-text="HTML class attribute:"></param>
+            <param name="width-unity" type="enum" _gui-text="Width unit:">
+            <_item value="px">Pixel (fixed)</_item>
+            <_item value="percent">Percent (relative to parent size)</_item>
+            <_item value="undefined">Undefined (relative to non-floating content size)</_item>
+            </param>
+            <param name="height-unity" type="enum" _gui-text="Height unit:">
+            <_item value="px">Pixel (fixed)</_item>
+            <_item value="percent">Percent (relative to parent size)</_item>
+            <_item value="undefined">Undefined (relative to non-floating content size)</_item>
+            </param>
+            <param name="bg-color" type="string" _gui-text="Background color:"></param>
+        </page>
+        <page name="Help" _gui-text="Help">
+            <_param name="about" type="description">Layout Group is only about to help a better code generation (if you need it). To use this, you must to select some "Slicer rectangles" first.</_param>
+        </page>
+    </param>
+    <effect needs-live-preview="false">
+        <object-type>all</object-type>
+        <effects-menu>
+            <submenu _name="Web">
+                <submenu _name="Slicer"/>
+            </submenu>
+        </effects-menu>
+    </effect>
+    <script>
+        <command reldir="extensions" interpreter="python">webslicer_create_group.py</command>
+    </script>
 </inkscape-extension>
index c6f9e653e3c6f5b809a52893bf1d2810fcfa5904..c2de0594be3aa9827cfd255a332e09b77b176d35 100644 (file)
@@ -28,26 +28,29 @@ class WebSlicer_CreateGroup(WebSlicer_Effect):
     def __init__(self):
         WebSlicer_Effect.__init__(self)
         self.OptionParser.add_option("--html-id",
-                                     action="store", type="string",
-                                     dest="html_id",
-                                     help="")
+                        action="store", type="string",
+                        dest="html_id",
+                        help="")
         self.OptionParser.add_option("--html-class",
-                                     action="store", type="string",
-                                     dest="html_class",
-                                     help="")
+                        action="store", type="string",
+                        dest="html_class",
+                        help="")
         self.OptionParser.add_option("--width-unity",
-                                     action="store", type="string",
-                                     dest="width_unity",
-                                     help="")
+                        action="store", type="string",
+                        dest="width_unity",
+                        help="")
         self.OptionParser.add_option("--height-unity",
-                                     action="store", type="string",
-                                     dest="height_unity",
-                                     help="")
+                        action="store", type="string",
+                        dest="height_unity",
+                        help="")
         self.OptionParser.add_option("--bg-color",
-                                     action="store", type="string",
-                                     dest="bg_color",
-                                     help="")
-
+                        action="store", type="string",
+                        dest="bg_color",
+                        help="")
+        self.OptionParser.add_option("--tab",
+                        action="store", type="string",
+                        dest="tab",
+                        help="The selected UI-tab when OK was pressed")
 
     def get_base_elements(self):
         self.layer = self.get_slicer_layer()
index 3a7324370dbc1764ab3cf802e91b1e84ce202aad..f82e42f33d99b619d746ded3d107685f13d586a8 100644 (file)
@@ -1,23 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
-  <_name>Export layout pieces and HTML+CSS code</_name>
-  <id>org.inkscape.web.slicer.export</id>
-  <dependency type="executable" location="extensions">webslicer_effect.py</dependency>
-  <dependency type="executable" location="extensions">webslicer_export.py</dependency>
-  <dependency type="executable" location="extensions">inkex.py</dependency>
-  <_param name="about" type="description">All sliced images, and optionaly code, will be generated as you had configured and saved to one directory.</_param>
-  <param name="dir" type="string" _gui-text="Directory path to export"></param>
-  <param name="create-dir" type="boolean" _gui-text="Create directory, if it does not exists">false</param>
-  <param name="with-code" type="boolean" _gui-text="With HTML and CSS">true</param>
-  <effect needs-live-preview="false">
+    <_name>Export layout pieces and HTML+CSS code</_name>
+    <id>org.inkscape.web.slicer.export</id>
+    <dependency type="executable" location="extensions">webslicer_effect.py</dependency>
+    <dependency type="executable" location="extensions">webslicer_export.py</dependency>
+    <dependency type="executable" location="extensions">inkex.py</dependency>
+       <param name="tab" type="notebook">
+        <page name="Options" _gui-text="Options">
+            <param name="dir" type="string" _gui-text="Directory path to export:"></param>
+            <param name="create-dir" type="boolean" _gui-text="Create directory, if it does not exists">false</param>
+            <param name="with-code" type="boolean" _gui-text="With HTML and CSS">true</param>
+        </page>
+        <page name="Help" _gui-text="Help">
+            <_param name="about" type="description">All sliced images, and optionaly code, will be generated as you had configured and saved to one directory.</_param>
+        </page>
+    </param>
+    <effect needs-live-preview="false">
     <object-type>all</object-type>
     <effects-menu>
-      <submenu _name="Web">
-        <submenu name="Slicer"/>
-      </submenu>
+        <submenu _name="Web">
+            <submenu name="Slicer"/>
+        </submenu>
     </effects-menu>
-  </effect>
-  <script>
-    <command reldir="extensions" interpreter="python">webslicer_export.py</command>
-  </script>
+    </effect>
+    <script>
+        <command reldir="extensions" interpreter="python">webslicer_export.py</command>
+    </script>
 </inkscape-extension>