From: Jim Evins Date: Fri, 31 Oct 2003 00:57:31 +0000 (+0000) Subject: Fixes glabels-batch frontend that broke when porting to gnome-print 2.2. This fixes... X-Git-Tag: glabels-2_3_0~559 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=de9574629d2b0fee2a1f898516863f80c9a43c53;p=glabels Fixes glabels-batch frontend that broke when porting to gnome-print 2.2. This fixes bug #832206. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@332 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/src/glabels-batch.c b/glabels2/src/glabels-batch.c index 94da88af..4269ec74 100644 --- a/glabels2/src/glabels-batch.c +++ b/glabels2/src/glabels-batch.c @@ -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); diff --git a/glabels2/src/print.c b/glabels2/src/print.c index dd0868ec..bebc16d6 100644 --- a/glabels2/src/print.c +++ b/glabels2/src/print.c @@ -382,8 +382,6 @@ gl_print_batch (GnomePrintJob *job, } gl_template_free (&template); - g_object_unref (G_OBJECT(merge)); - gl_debug (DEBUG_PRINT, "END"); }