]> git.sur5r.net Git - glabels/blobdiff - glabels2/src/bc.c
2009-07-26 Jim Evins <evins@snaught.com>
[glabels] / glabels2 / src / bc.c
index df561c82ee99381b5756174f6a3ba619c234208a..70d72c5b4d5cc4e26ec24e80363f87bc5b93fc50 100644 (file)
@@ -1,3 +1,5 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
+
 /*
  *  (GLABELS) Label and Business Card Creation program for GNOME
  *
  */
 #include <config.h>
 
-#include <libgnome/libgnome.h>
-
 #include "bc.h"
+
+#include <glib/gi18n.h>
+#include <glib/gmem.h>
+#include <glib/gstrfuncs.h>
+#include <glib/gmessages.h>
+
 #include "bc-postnet.h"
 #include "bc-gnubarcode.h"
+#include "bc-iec16022.h"
+#include "bc-iec18004.h"
 
 #include "debug.h"
 
@@ -55,7 +63,7 @@ typedef struct {
 /* Private globals.                                       */
 /*========================================================*/
 
-Backend backends[] = {
+static const Backend backends[] = {
 
        { "POSTNET", N_("POSTNET (any)"), gl_barcode_postnet_new,
          FALSE, FALSE, TRUE, FALSE, "12345-6789-12", FALSE, 11},
@@ -69,6 +77,9 @@ Backend backends[] = {
        { "POSTNET-11", N_("POSTNET-11 (DPBC)"), gl_barcode_postnet_new,
          FALSE, FALSE, TRUE, FALSE, "12345-6789-12", FALSE, 11},
 
+       { "CEPNET", N_("CEPNET"), gl_barcode_postnet_new,
+         FALSE, FALSE, TRUE, FALSE, "12345-678", FALSE, 8},
+
        { "EAN", N_("EAN (any)"), gl_barcode_gnubarcode_new,
          TRUE, TRUE, TRUE, FALSE, "000000000000 00000", FALSE, 17},
 
@@ -124,7 +135,7 @@ Backend backends[] = {
          TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10},
 
        { "Code128C", N_("Code 128C"), gl_barcode_gnubarcode_new,
-         TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10},
+         TRUE, TRUE, TRUE, FALSE, "0000000000", TRUE, 10},
 
        { "Code128B", N_("Code 128B"), gl_barcode_gnubarcode_new,
          TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10},
@@ -141,6 +152,12 @@ Backend backends[] = {
        { "PLS", N_("Plessey"), gl_barcode_gnubarcode_new,
          TRUE, TRUE, TRUE, TRUE, "0000000000", TRUE, 10},
 
+       { "IEC16022", N_("IEC16022 (DataMatrix)"), gl_barcode_iec16022_new,
+         FALSE, FALSE, TRUE, FALSE, "12345678", TRUE, 8},
+
+       { "IEC18004", N_("IEC18004 (QRCode)"), gl_barcode_iec18004_new,
+         FALSE, FALSE, TRUE, FALSE, "12345678", TRUE, 8},
+
        { NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL, FALSE, 0}
 
 };
@@ -168,7 +185,7 @@ id_to_index (const gchar *id)
                }
        }
 
-       g_warning( "Unknown barcode id \"%s\"", id );
+       g_message( "Unknown barcode id \"%s\"", id );
        return 0;
 }
 
@@ -188,7 +205,7 @@ name_to_index (const gchar *name)
                }
        }
 
-       g_warning( "Unknown barcode name \"%s\"", name );
+       g_message( "Unknown barcode name \"%s\"", name );
        return 0;
 }