* AUTHORS:
* data/avery-us-templates.xml:
Added entries for "LSK-3," "LSK-5," and "LSK-8." Submitted by JBadger.
* libglabels/template.c: (read_template_files_from_dir):
Corrected problem with testing for extensions.
* src/object-editor.glade:
Corrected grouping of radio buttons in barcode data page.
* src/print.c: (draw_barcode_object):
* src/view-barcode.c: (draw_barcode):
Corrected problem with calculation of y_offset for locating characters.
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@408
f5e0f49d-192f-0410-a22d-
a8d8700d0965
Wayne Schuller
Thomas Vill
Fred Bacon
+ JBadger
And many others for their many helpful suggestions and bug reports -- thanks.
+2004-01-31 Jim Evins <evins@snaught.com>
+
+ * AUTHORS:
+ * data/avery-us-templates.xml:
+ Added entries for "LSK-3," "LSK-5," and "LSK-8." Submitted by JBadger.
+
+ * libglabels/template.c: (read_template_files_from_dir):
+ Corrected problem with testing for extensions.
+
+ * src/object-editor.glade:
+ Corrected grouping of radio buttons in barcode data page.
+
+ * src/print.c: (draw_barcode_object):
+ * src/view-barcode.c: (draw_barcode):
+ Corrected problem with calculation of y_offset for locating characters.
+
2004-01-24 Jim Evins <evins@snaught.com>
* AUTHORS:
</Template>
+ <!-- ******************************************************************** -->
+ <!-- Avery labels in tech builitin 152 -->
+ <!-- http://www.avery.com/help/tech_bulletin.jsp?tech_bull_code=152 -->
+ <!-- ******************************************************************** -->
+ <Template name="Avery LSK-8" size="US-Letter" description="Divider Labels">
+ <Label-rectangle id="0" width="1.13in" height="0.5in" round="5">
+ <Markup-margin size="5"/>
+ <Layout nx="4" ny="20" x0="0.5in" y0="0.5in" dx="2.13in" dy="0.5in"/>
+ </Label-rectangle>
+ </Template>
+ <!-- the LSK labels can be torn in half down the center -->
+ <Template name="Avery LSK-8.5" size="US-Letter" description="Divider Labels">
+ <Label-rectangle id="1" width="1.13in" height="0.5in" round="5">
+ <Markup-margin size="5"/>
+ <Layout nx="2" ny="20" x0="0.5in" y0="0.5in" dx="2.13in" dy="0.5in"/>
+ </Label-rectangle>
+ </Template>
+ <Template name="Avery LSK-5" size="US-Letter" description="Divider Labels">
+ <Label-rectangle id="2" width="1.75in" height="0.5in" round="5">
+ <Markup-margin size="5"/>
+ <Layout nx="4" ny="20" x0="0.5in" y0="0.3in" dx="2.05in" dy="0.5in"/>
+ </Label-rectangle>
+ </Template>
+ <!-- the LSK labels can be torn in half down the center -->
+ <Template name="Avery LSK-5.5" size="US-Letter" description="Divider Labels">
+ <Label-rectangle id="3" width="1.75in" height="0.5in" round="5">
+ <Markup-margin size="5"/>
+ <Layout nx="2" ny="20" x0="0.5in" y0="0.3in" dx="2.05in" dy="0.5in"/>
+ </Label-rectangle>
+ </Template>
+ <Template name="Avery LSK-3" size="US-Letter" description="Divider Labels">
+ <Label-rectangle id="4" width="3.13in" height="0.5in" round="5">
+ <Markup-margin size="5"/>
+ <Layout nx="2" ny="20" x0="0.5in" y0="0.5in" dx="4.38in" dy="0.5in"/>
+ </Label-rectangle>
+ </Template>
+ <!-- the LSK labels can be torn in half down the center -->
+ <Template name="Avery LSK-3.5" size="US-Letter" description="Divider Labels">
+ <Label-rectangle id="5" width="3.13in" height="0.5in" round="5">
+ <Markup-margin size="5"/>
+ <Layout nx="1" ny="20" x0="0.5in" y0="0.5in" dx="4.38in" dy="0.5in"/>
+ </Label-rectangle>
+ </Template>
</Glabels-templates>
extension = strrchr (filename, '.');
extension2 = strrchr (filename, '-');
- if (extension != NULL) {
+ if ( (extension && (g_strcasecmp (extension, ".template") == 0)) ||
+ (extension2 && (g_strcasecmp (extension2, "-templates.xml") == 0)) ) {
- if ( (g_strcasecmp (extension, ".template") == 0)
- || (g_strcasecmp (extension2, "-templates.xml") == 0) ) {
-
- full_filename =
- g_build_filename (dirname, filename, NULL);
- new_templates =
- gl_xml_template_read_templates_from_file (full_filename);
- g_free (full_filename);
-
- templates = g_list_concat (templates, new_templates);
- new_templates = NULL;
- }
+ full_filename = g_build_filename (dirname, filename, NULL);
+ new_templates =
+ gl_xml_template_read_templates_from_file (full_filename);
+ g_free (full_filename);
+ templates = g_list_concat (templates, new_templates);
+ new_templates = NULL;
}
}
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
+ <property name="group">data_literal_radio</property>
</widget>
<packing>
<property name="left_attach">0</property>
gnome_print_setopacity (pi->pc,
GL_COLOR_F_ALPHA (color));
- y_offset = 12.0 - gnome_font_get_descender (font);
+ y_offset = 12.0 - fabs (gnome_font_get_descender (font));
gnome_print_moveto (pi->pc, 0.0, y_offset);
gnome_print_gsave (pi->pc);
gnome_print_scale (pi->pc, 1.0, -1.0);
- gnome_print_show (pi->pc, _("Invalid barcode"));
+ gnome_print_show (pi->pc, _("Invalid barcode data"));
gnome_print_grestore (pi->pc);
} else {
GL_COLOR_F_ALPHA (color));
y_offset =
- bchar->y + bchar->fsize -
- gnome_font_get_descender (font);
- gnome_print_moveto (pi->pc, bchar->x, y_offset);
+ bchar->fsize - fabs (gnome_font_get_descender (font));
+
+ gnome_print_moveto (pi->pc, bchar->x, bchar->y+y_offset);
cstring = g_strdup_printf ("%c", bchar->c);
gnome_print_gsave (pi->pc);
gbc = gl_barcode_new (style, text_flag, checksum_flag, w, h, digits);
if (gbc == NULL) {
- cstring = _("Invalid barcode");
+ cstring = _("Invalid barcode data");
glyphlist = gnome_glyphlist_from_text_sized_dumb (font,
color,
0.0, 0.0,
cstring,
strlen
(cstring));
- y_offset = 10.0 - gnome_font_get_descender (font);
+ y_offset = 10.0 - fabs (gnome_font_get_descender (font));
item = gl_view_object_item_new (GL_VIEW_OBJECT(view_barcode),
gl_canvas_hacktext_get_type (),
"x", 0.0,
c),
1);
y_offset =
- bchar->fsize - gnome_font_get_descender (font);
+ bchar->fsize - fabs (gnome_font_get_descender (font));
+
item = gl_view_object_item_new (GL_VIEW_OBJECT(view_barcode),
gl_canvas_hacktext_get_type (),
"x", bchar->x,