]> git.sur5r.net Git - glabels/commitdiff
Fixes glabels-batch frontend that broke when porting to gnome-print 2.2. This fixes...
authorJim Evins <evins@snaught.com>
Fri, 31 Oct 2003 00:57:31 +0000 (00:57 +0000)
committerJim Evins <evins@snaught.com>
Fri, 31 Oct 2003 00:57:31 +0000 (00:57 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@332 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/glabels-batch.c
glabels2/src/print.c

index 94da88af4d34a1ac3b27013ee1ec4c52a494e43d..4269ec740d5730ccdca6088ebd3ae5d836e7e7d8 100644 (file)
@@ -135,10 +135,21 @@ main (int argc, char **argv)
 
                        if ( job == NULL ) {
                                job = gnome_print_job_new (NULL);
+                               abs_fn = gl_util_make_absolute ( output );
+                               config = gnome_print_job_get_config (job);
+                               gnome_print_config_set (config,
+                                                       "Printer",
+                                                       "GENERIC");
+                               gnome_print_config_set (config,
+                                                       "Settings.Transport.Backend",
+                                                       "file");
+                               gnome_print_config_set (config,
+                                                       "Settings.Transport.Backend.FileName",
+                                                       abs_fn);
+                               g_free( abs_fn );
                        }
 
                        gl_print_batch (job, label, n_sheets, n_copies, &flags);
-
                        g_object_unref (label);
                }
                else {
@@ -148,10 +159,6 @@ main (int argc, char **argv)
        }
        if ( job != NULL ) {
 
-               abs_fn = gl_util_make_absolute ( output );
-               gnome_print_job_print_to_file (job, abs_fn);
-               g_free( abs_fn );
-
                gnome_print_job_close (job);
                gnome_print_job_print (job);
 
index dd0868ecca716d83403d4826ab09b0c74e9c1090..bebc16d6ca3082a555608e9eb8bd28cfb816dbff 100644 (file)
@@ -382,8 +382,6 @@ gl_print_batch (GnomePrintJob    *job,
        }
        gl_template_free (&template);
 
-       g_object_unref (G_OBJECT(merge));
-
        gl_debug (DEBUG_PRINT, "END");
 }