]> www.fi.muni.cz Git - evince.git/commitdiff
Fix printing in dvi backend when filename contains white espaces. Fixes
authorCarlos Garcia Campos <carlosgc@gnome.org>
Sun, 27 Jan 2008 18:07:48 +0000 (18:07 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Sun, 27 Jan 2008 18:07:48 +0000 (18:07 +0000)
2008-01-27  Carlos Garcia Campos  <carlosgc@gnome.org>
* backend/dvi/dvi-document.c: (dvi_document_file_exporter_end):
Fix printing in dvi backend when filename contains white
espaces. Fixes bug #502839.

svn path=/trunk/; revision=2865

ChangeLog
backend/dvi/dvi-document.c

index e7d5c2982e09cf62692aab6bb66602189c40231c..dc6e1204840d942ed1be10962490f26091af5390 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-27  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * backend/dvi/dvi-document.c: (dvi_document_file_exporter_end):
+
+       Fix printing in dvi backend when filename contains white
+       espaces. Fixes bug #502839.
+       
 2008-01-26  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * cut-n-paste/totem-screensaver/totem-scrsaver.c:
index 1e82fb3127511aa8604a2154f45a32c09e553151..c8295232a3aaaa5b8481b6d4ba120bce58f2e1d6 100644 (file)
@@ -363,7 +363,7 @@ dvi_document_file_exporter_begin (EvFileExporter        *exporter,
        
        if (dvi_document->exporter_filename)
                g_free (dvi_document->exporter_filename);       
-       dvi_document->exporter_filename = g_strdup(fc->filename);
+       dvi_document->exporter_filename = g_strdup (fc->filename);
        
        if (dvi_document->exporter_opts) {
                g_string_free (dvi_document->exporter_opts, TRUE);
@@ -377,7 +377,7 @@ dvi_document_file_exporter_do_page (EvFileExporter  *exporter,
 {
        DviDocument *dvi_document = DVI_DOCUMENT(exporter);
 
-       g_string_append_printf(dvi_document->exporter_opts, "%d,", (rc->page)+1);
+       g_string_append_printf (dvi_document->exporter_opts, "%d,", (rc->page) + 1);
 }
 
 static void
@@ -390,7 +390,7 @@ dvi_document_file_exporter_end (EvFileExporter *exporter)
        
        DviDocument *dvi_document = DVI_DOCUMENT(exporter);
        
-       command_line = g_strdup_printf ("dvipdfm %s -o %s %s", /* dvipdfm -s 1,2,.., -o exporter_filename dvi_filename */
+       command_line = g_strdup_printf ("dvipdfm %s -o %s \"%s\"", /* dvipdfm -s 1,2,.., -o exporter_filename dvi_filename */
                                        dvi_document->exporter_opts->str,
                                        dvi_document->exporter_filename,
                                        dvi_document->context->filename);
@@ -401,7 +401,7 @@ dvi_document_file_exporter_end (EvFileExporter *exporter)
                                             &exit_stat,
                                             &err);
 
-       g_free(command_line);
+       g_free (command_line);
 
        if (success == FALSE) {
                g_warning ("Error: %s", err->message);
@@ -410,7 +410,7 @@ dvi_document_file_exporter_end (EvFileExporter *exporter)
        }
 
        if (err)
-               g_error_free(err);
+               g_error_free (err);
 }
 
 static EvFileExporterCapabilities