Code

Correct load order of user icons.svg icons with legacy names.
[inkscape.git] / share / extensions / webslicer_create_group.py
index 666649bfb04d5082ca8227f78100adf80dfdd2ad..c2de0594be3aa9827cfd255a332e09b77b176d35 100644 (file)
@@ -28,22 +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="")
+        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()
@@ -72,14 +79,11 @@ class WebSlicer_CreateGroup(WebSlicer_Effect):
         g_parent = self.getParentNode(node)
         group = inkex.etree.SubElement(g_parent, 'g')
         desc = inkex.etree.SubElement(group, 'desc')
-        conf_txt = ''
-        if not is_empty(self.options.html_id):
-            conf_txt += 'html-id:'    + self.options.html_id +'\n'
-        if not is_empty(self.options.html_class):
-            conf_txt += 'html-class:' + self.options.html_class +'\n'
-        conf_txt += 'width-unity:' + self.options.width_unity +'\n'
-        conf_txt += 'height-unity:' + self.options.height_unity
-        desc.text = conf_txt
+        desc.text = self.get_conf_text_from_list(
+            [ 'html_id', 'html_class',
+              'width_unity', 'height_unity',
+              'bg_color' ] )
+
         for id,node in self.selected.iteritems():
             group.insert( 1, node )