From: Jim Evins Date: Sun, 15 Aug 2004 01:54:26 +0000 (+0000) Subject: 2004-08-14 Jim Evins X-Git-Tag: glabels-2_3_0~448 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=968a16da88603023f7c7b5e526fd5a7a9099d94c;p=glabels 2004-08-14 Jim Evins * libglabels/xml-paper.c: (gl_xml_paper_parse_paper_node): * libglabels/xml-template.c: (gl_xml_template_parse_template_node): * src/xml-label-191.c: (xml191_parse_sheet): Fixed improper freeing of gettext strings. Merged from 2.0.1. * configure.in: Reconciled libglabels versioning with 2.0.1. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@457 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index ffbb3d34..4a584270 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,13 @@ +2004-08-14 Jim Evins + + * libglabels/xml-paper.c: (gl_xml_paper_parse_paper_node): + * libglabels/xml-template.c: (gl_xml_template_parse_template_node): + * src/xml-label-191.c: (xml191_parse_sheet): + Fixed improper freeing of gettext strings. Merged from 2.0.1. + * configure.in: + Reconciled libglabels versioning with 2.0.1. + + 2004-08-14 Jim Evins * configure.in: diff --git a/glabels2/configure.in b/glabels2/configure.in index 4cd32a09..ddee81c3 100644 --- a/glabels2/configure.in +++ b/glabels2/configure.in @@ -39,7 +39,7 @@ dnl 5. If any interfaces have been added since the last public release, then inc dnl 6. If any interfaces have been removed since the last public release, then set age dnl to 0. LIBGLABELS_C=1 -LIBGLABELS_R=0 +LIBGLABELS_R=1 LIBGLABELS_A=0 LIBGLABELS_VERSION_INFO=${LIBGLABELS_C}:${LIBGLABELS_R}:${LIBGLABELS_A} diff --git a/glabels2/libglabels/xml-paper.c b/glabels2/libglabels/xml-paper.c index 7bf16288..e9425319 100644 --- a/glabels2/libglabels/xml-paper.c +++ b/glabels2/libglabels/xml-paper.c @@ -136,7 +136,14 @@ gl_xml_paper_parse_paper_node (xmlNodePtr paper_node) name = xmlGetProp (paper_node, "_name"); if (name != NULL) { - name = gettext (name); + + gchar *tmp = gettext (name); + + if (tmp != name) { + g_free (name); + name = g_strdup (tmp); + } + } else { name = xmlGetProp (paper_node, "name"); } diff --git a/glabels2/libglabels/xml-template.c b/glabels2/libglabels/xml-template.c index f3fd21b5..4d93409c 100644 --- a/glabels2/libglabels/xml-template.c +++ b/glabels2/libglabels/xml-template.c @@ -173,7 +173,14 @@ gl_xml_template_parse_template_node (const xmlNodePtr template_node) description = xmlGetProp (template_node, "_description"); if (description != NULL) { - description = gettext (description); + + gchar *tmp = gettext (description); + + if (tmp != description) { + g_free (description); + description = g_strdup (tmp); + } + } else { description = xmlGetProp (template_node, "description"); } diff --git a/glabels2/src/xml-label-191.c b/glabels2/src/xml-label-191.c index a6f9168e..08b9acab 100644 --- a/glabels2/src/xml-label-191.c +++ b/glabels2/src/xml-label-191.c @@ -695,7 +695,16 @@ xml191_parse_sheet (xmlNodePtr sheet_node) description = xmlGetProp (sheet_node, "_description"); if (description != NULL) { - template->description = gettext (description); + + gchar *tmp = gettext (description); + + if (tmp == description) { + template->description = description; + } else { + template->description = g_strdup (tmp); + } + + } else { template->description = xmlGetProp (sheet_node, "description"); }