tag 320336 patch
thanks

The attached patch allows tcm to work with the current version of gv,
which expects `--media=<a4|letter> --orientation=<portrait|landscape>'
rather than `-<a4|letter> -<portrait|landscape>'.

Thanks,

Matej
diff -ruN tcm-2.20+TSQD/src/ed/printer.c tcm-2.20+TSQD.mv/src/ed/printer.c
--- tcm-2.20+TSQD/src/ed/printer.c      2004-07-21 19:51:37.000000000 +0200
+++ tcm-2.20+TSQD.mv/src/ed/printer.c   2005-09-09 19:04:13.000000000 +0200
@@ -170,7 +170,7 @@
        char tmp[MAXNAME];
        System::GiveFile(previewCommand.getstr(), tmp);
        string command = tmp;
-       if (command == "ghostview" || command == "gv") {
+       if (command == "ghostview") {
                string pgs = "-";
                string sz;
                PageSize::Type2String(pageSize, &sz);
@@ -181,6 +181,15 @@
                                        "-portrait":"-landscape", 
                                psFileName.getstr());
        }
+       else if (command == "gv") {
+               string sz;
+               PageSize::Type2String(pageSize, &sz);
+               sprintf(tmp, "%s --media=%s --orientation=%s %s 2>&1\n",
+                               previewCommand.getstr(), sz.getstr(),
+                               pageOrientation==Config::PORTRAIT?
+                                       "portrait":"landscape", 
+                               psFileName.getstr());
+       }
        else    // simplistic previewing ...
                sprintf(tmp, "%s %s 2>&1\n", previewCommand.getstr(), 
                                             psFileName.getstr());

Reply via email to