+2008-01-25 Jim Evins <evins@snaught.com>
+
+ * src/bc.c:
+ Fixed Code128C backend parameters.
+ * src/label-barcode.c: (get_size):
+ Bug #1766425. If barcode is not renderable with either
+ input data or default data, use a default size. Also
+ fixed small leak.
+
2008-01-16 Jim Evins <evins@snaught.com>
* src/print.c: (print_label):
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},
w_parent,
h_parent,
data);
+ g_free (data);
if ( gbc == NULL ) {
/* Try again with default digits. */
w_parent,
h_parent,
data);
+ g_free (data);
}
- *w = gbc->width;
- *h = gbc->height;
+ if ( gbc != NULL )
+ {
+ *w = gbc->width;
+ *h = gbc->height;
+ }
+ else
+ {
+ /* If we still can't render, just set a default size. */
+ *w = 144;
+ *h = 72;
+ }
gl_barcode_free (&gbc);
- g_free (data);
gl_debug (DEBUG_LABEL, "END");
}