summaryrefslogtreecommitdiffstats
path: root/share/extensions/webslicer_create_group.py
diff options
context:
space:
mode:
authorAurélio A. Heckert (a) <auriumgmaildotcom>2010-04-26 04:45:48 +0000
committerAurélio A. Heckert (a) <auriumgmaildotcom>2010-04-26 04:45:48 +0000
commitb1db6a5c2ff1bc56d11afff0f1688a09af5b89e2 (patch)
tree4150b1ecf033176c8c83a1c82f1783c64569b9cb /share/extensions/webslicer_create_group.py
parentadd 'area' calculation to Measure extension (diff)
downloadinkscape-b1db6a5c2ff1bc56d11afff0f1688a09af5b89e2.tar.gz
inkscape-b1db6a5c2ff1bc56d11afff0f1688a09af5b89e2.zip
webslicer is starting to export image pieces
(bzr r9375)
Diffstat (limited to 'share/extensions/webslicer_create_group.py')
-rw-r--r--share/extensions/webslicer_create_group.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/share/extensions/webslicer_create_group.py b/share/extensions/webslicer_create_group.py
index 666649bfb..c6f9e653e 100644
--- a/share/extensions/webslicer_create_group.py
+++ b/share/extensions/webslicer_create_group.py
@@ -43,6 +43,10 @@ class WebSlicer_CreateGroup(WebSlicer_Effect):
action="store", type="string",
dest="height_unity",
help="")
+ self.OptionParser.add_option("--bg-color",
+ action="store", type="string",
+ dest="bg_color",
+ help="")
def get_base_elements(self):
@@ -72,14 +76,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 )