]> git.sur5r.net Git - glabels/commitdiff
2004-01-31 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Sat, 31 Jan 2004 05:15:08 +0000 (05:15 +0000)
committerJim Evins <evins@snaught.com>
Sat, 31 Jan 2004 05:15:08 +0000 (05:15 +0000)
* 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

glabels2/AUTHORS
glabels2/ChangeLog
glabels2/data/avery-us-templates.xml
glabels2/libglabels/template.c
glabels2/src/object-editor.glade
glabels2/src/print.c
glabels2/src/view-barcode.c

index f0f93f8628d9124f82297a76942d7cb62b81064d..f18f09130124ff2d70b8ff2ecd81d1c222935729 100644 (file)
@@ -127,5 +127,6 @@ particular products (I apologize if I have missed anybody):
        Wayne Schuller
        Thomas Vill
        Fred Bacon
+       JBadger
 
 And many others for their many helpful suggestions and bug reports -- thanks.
index 35c172f66b1ec68742d6fcdf890aec738c048f49..829ba633a8655a64192d3157e4f435c215e4777f 100644 (file)
@@ -1,3 +1,19 @@
+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:
index 12154dc98944d7a73a3228116968a6db316a9b67..b83e1beeb66568157d6f14de3ce3696b3cd5ba19 100644 (file)
   </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>
 
index 248d7854aac971fa59c9bd00a592fb5ca44557e9..21cbfcede152efacf899f36c0df76fc8fb7ef0a5 100644 (file)
@@ -927,21 +927,16 @@ read_template_files_from_dir (GList       *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;
                }
 
        }
index d2ed9164d044929bbebe8a5aaad0c973570257c7..e167c6eaf48713e7bbc80e1818b84689c60c5fc7 100644 (file)
                          <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>
index a45ce8eff6f4adccc58b4eb812196f12f1d778fc..769cac6badcc456e6ab6c4ad28eea172634f62f1 100644 (file)
@@ -1034,12 +1034,12 @@ draw_barcode_object (PrintInfo      *pi,
                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 {
@@ -1076,9 +1076,9 @@ draw_barcode_object (PrintInfo      *pi,
                                                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);
index 8726eb650722f674bf783591f7d53c63cddd9b76..6b5dc852593b2c7c5a14b713faf59afd922c31ae 100644 (file)
@@ -568,14 +568,14 @@ draw_barcode (glViewBarcode *view_barcode)
        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,
@@ -622,7 +622,8 @@ draw_barcode (glViewBarcode *view_barcode)
                                                                           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,