]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Liason.C
We don't currently use fork anywhere (or if we do it's by mistake!), so
[lyx.git] / src / frontends / Liason.C
index 5b66b8a94dab74b1178b0c01028cffe2d8127687..e038c8b3f357fdb65ab0ccf19a17d09fc8f1a67a 100644 (file)
@@ -4,7 +4,7 @@
  *           LyX, The Document Processor
  *        
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  * ====================================================== */
 
 #include "lyxrc.h"
 #include "PrinterParams.h"
 #include "lyx_gui_misc.h"
+#include "support/LAssert.h"
 #include "support/lstrings.h"
 #include "support/filetools.h"
 #include "support/path.h"
 #include "exporter.h"
 #include "converter.h"
-#include "minibuffer.h"
 #include "support/syscall.h"
 
 using std::endl;
@@ -106,8 +106,8 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
                return false;
 
        // Push directory path.
-       string path = OnlyPath(buffer->fileName());
-       if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
+       string path = buffer->filePath();
+       if (lyxrc.use_tempdir || !IsDirWriteable(path)) {
                path = buffer->tmppath;
        }
        Path p(path);
@@ -134,13 +134,13 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
                        command2 += QuoteName(psname);
                        // First run dvips.
                        // If successful, then spool command
-                       res = one.startscript(Systemcalls::System, command);
+                       res = one.startscript(Systemcalls::Wait, command);
                        if (res == 0)
-                               res = one.startscript(Systemcalls::SystemDontWait,
+                               res = one.startscript(Systemcalls::DontWait,
                                                      command2);
                } else
                        // case 2
-                       res = one.startscript(Systemcalls::SystemDontWait,
+                       res = one.startscript(Systemcalls::DontWait,
                                              command + QuoteName(dviname));
                break;
 
@@ -149,15 +149,17 @@ bool printBuffer(Buffer * buffer, PrinterParams const & pp)
                command += lyxrc.print_to_file
                        + QuoteName(MakeAbsPath(pp.file_name, path));
                command += ' ' + QuoteName(dviname);
-               res = one.startscript(Systemcalls::SystemDontWait, command);
+               res = one.startscript(Systemcalls::DontWait, command);
                break;
        }
        return res == 0;
 }
 
-void setMinibuffer(LyXView * lv, char const * msg)
+
+void setMinibuffer(LyXView * lv, string const & msg)
 {
-       lv->getMiniBuffer()->Set(msg);
+       lyx::Assert(lv);
+       lv->message(msg);
 }
 
 } // namespace Liason