]> git.sur5r.net Git - glabels/commitdiff
2004-08-22 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Sun, 22 Aug 2004 20:43:36 +0000 (20:43 +0000)
committerJim Evins <evins@snaught.com>
Sun, 22 Aug 2004 20:43:36 +0000 (20:43 +0000)
* AUTHORS:
* src/glabels-batch.c: (main):
Applied patch with minor mods to allow selecting merge source and
crop-marks on glabels-batch's command line.  Original patch provided by
José Dapena Paz <jdapena@igalia.com>.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@461 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/AUTHORS
glabels2/ChangeLog
glabels2/src/glabels-batch.c

index 687d3067402b52f010f21c81245d4fce7da2a857..a837a3af48d892557ea8651d8b1f411a045893f1 100644 (file)
@@ -47,6 +47,7 @@ Glabels includes contributions from:
                                                       0.4.3:
        Javier Donaire Segarra <jyuyu@users.sourceforge.net>
        Alessandro Zummo <azummo@towertech.it>
+       José Dapena Paz <jdapena@igalia.com>
        Akkana <akkana@shallowsky.com>
        Dag Wieers <dag@wieers.com>
 
index 8e1c5b1d49557fc151d613ae3ff480a87d82b49b..f16997e1ffc8101b49a132ca9ad4dd13b1969b90 100644 (file)
@@ -1,3 +1,11 @@
+2004-08-22  Jim Evins  <evins@snaught.com>
+
+       * AUTHORS:
+       * src/glabels-batch.c: (main):
+               Applied patch with minor mods to allow selecting merge source and
+               crop-marks on glabels-batch's command line.  Original patch provided by
+               José Dapena Paz <jdapena@igalia.com>.
+       
 2004-08-15  Jim Evins  <evins@snaught.com>
 
        * data/desktop/glabels.desktop.in:
index 381ca9b570a474ad2b1ece720d181d92d4f0d439..dc32147e429cbf23cd65e8d22f5a928b25b88815 100644 (file)
@@ -42,6 +42,8 @@ static gint     n_copies     = 1;
 static gint     n_sheets     = 1;
 static gboolean outline_flag = FALSE;
 static gboolean reverse_flag = FALSE;
+static gboolean crop_marks_flag = FALSE;
+static gchar    *input       = NULL;
 
 static struct poptOption options[] = {
        {"help", '?', POPT_ARG_NONE, &help_flag, 1,
@@ -58,6 +60,10 @@ static struct poptOption options[] = {
         N_("print outlines (to test printer alignment)"), NULL},
        {"reverse", 'r', POPT_ARG_NONE, &reverse_flag, 0,
         N_("print in reverse (i.e. a mirror image)"), NULL},
+       {"cropmarks", 'C', POPT_ARG_NONE, &crop_marks_flag, 0,
+        N_("print crop marks"), NULL},
+       {"input", 'i', POPT_ARG_STRING, &input, 0,
+        N_("input file for merging"), N_("filename")},
        {NULL, '\0', 0, NULL, 0, NULL, NULL}
 };
 
@@ -79,6 +85,7 @@ main (int argc, char **argv)
        gchar             *abs_fn;
        GnomePrintConfig  *config = NULL;
        glLabel           *label = NULL;
+       glMerge           *merge = NULL;
        glXMLLabelStatus   status;
        glPrintFlags       flags;
 
@@ -121,7 +128,7 @@ main (int argc, char **argv)
 
        flags.outline = outline_flag;
        flags.reverse = reverse_flag;
-       flags.crop_marks = FALSE;
+       flags.crop_marks = crop_marks_flag;
 
        /* initialize components */
        gl_merge_init ();
@@ -130,10 +137,23 @@ main (int argc, char **argv)
 
        /* now print the files */
        for (p = file_list; p; p = p->next) {
-               g_print ("LABEL FILE = %s\n", p->data);
+               g_print ("LABEL FILE = %s\n", (gchar *) p->data);
                label = gl_xml_label_open (p->data, &status);
+
+
                if ( status == XML_LABEL_OK ) {
 
+                       if (input != NULL) {
+                               merge = gl_label_get_merge (label);
+                               if (merge != NULL) {
+                                       gl_merge_set_src(merge, input);
+                                       gl_label_set_merge(label, merge);
+                               } else {
+                                       fprintf ( stderr,
+                                                 _("cannot perform document merge with glabels file %s\n"),
+                                                 (char *)p->data );
+                               }
+                       }
                        if ( job == NULL ) {
                                job = gnome_print_job_new (NULL);
                                abs_fn = gl_util_make_absolute ( output );