From: Jim Evins Date: Sun, 27 Apr 2003 04:53:36 +0000 (+0000) Subject: Applied barcode patch to save and restore barcode sizes, provided by Alessandro Zummo... X-Git-Tag: glabels-2_3_0~636 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d7e2e958e19d141526a63ad6d975b6f89ee2d67d;p=glabels Applied barcode patch to save and restore barcode sizes, provided by Alessandro Zummo . git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@253 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/src/xml-label.c b/glabels2/src/xml-label.c index c1445d79..37f7f71e 100644 --- a/glabels2/src/xml-label.c +++ b/glabels2/src/xml-label.c @@ -660,6 +660,7 @@ xml_parse_barcode_props (xmlNodePtr node, { GObject *object; xmlNodePtr child; + gdouble w, h; gchar *string; glTextNode *text_node; glBarcodeStyle style; @@ -671,6 +672,9 @@ xml_parse_barcode_props (xmlNodePtr node, object = gl_label_barcode_new (label); + w = gl_xml_get_prop_double (node, "w", 0); + h = gl_xml_get_prop_double (node, "h", 0); + color = gl_xml_get_prop_uint_hex (node, "color", 0); string = xmlGetProp (node, "style"); @@ -693,6 +697,8 @@ xml_parse_barcode_props (xmlNodePtr node, } } + gl_label_object_set_size (GL_LABEL_OBJECT(object), w, h); + gl_label_barcode_set_data (GL_LABEL_BARCODE(object), text_node); gl_label_barcode_set_props (GL_LABEL_BARCODE(object), style, text_flag, checksum_flag, color); @@ -1180,6 +1186,7 @@ xml_create_barcode_props (xmlNodePtr object_node, xmlNsPtr ns, glLabelObject *object) { + gdouble w, h; glTextNode *text_node; glBarcodeStyle style; gboolean text_flag; @@ -1191,6 +1198,12 @@ xml_create_barcode_props (xmlNodePtr object_node, xmlSetProp (object_node, "type", "Barcode"); + gl_label_object_get_size (GL_LABEL_OBJECT(object), &w, &h); + + gl_xml_set_prop_double (object_node, "w", w); + gl_xml_set_prop_double (object_node, "h", h); + + text_node = gl_label_barcode_get_data (GL_LABEL_BARCODE(object)); gl_label_barcode_get_props (GL_LABEL_BARCODE(object), &style, &text_flag, &checksum_flag, &color);