]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
Move Dialog.{h,cpp} and ButtonPolicy.{h,cpp} to frontends/qt4/
[lyx.git] / src / BufferList.cpp
index e3fb568c7c5e8c69cc954a11eb1f1a8eb937cc75..60f87a020199fa7bb475106f16b0ff61d882a76e 100644 (file)
@@ -25,6 +25,7 @@
 #include "frontends/alert.h"
 
 #include "support/filetools.h"
+#include "support/lstrings.h"
 #include "support/Package.h"
 
 #include <boost/bind.hpp>
@@ -99,10 +100,12 @@ bool BufferList::quitWriteBuffer(Buffer * buf)
        BOOST_ASSERT(buf);
 
        docstring file;
+
+       // FIXME: Unicode?
        if (buf->isUnnamed())
-               file = from_utf8(onlyFilename(buf->absFileName()));
+               file = from_utf8(buf->fileName().onlyFileName());
        else
-               file = makeDisplayPath(buf->absFileName(), 30);
+               file = buf->fileName().displayName(30);
 
        docstring const text =
                bformat(_("The document %1$s has unsaved changes.\n\n"
@@ -182,8 +185,7 @@ Buffer * BufferList::newBuffer(string const & s, bool const ronly)
 {
        auto_ptr<Buffer> tmpbuf(new Buffer(s, ronly));
        tmpbuf->params().useClassDefaults();
-       LYXERR(Debug::INFO) << "Assigning to buffer "
-                           << bstore.size() << endl;
+       LYXERR(Debug::INFO, "Assigning to buffer " << bstore.size());
        bstore.push_back(tmpbuf.get());
        return tmpbuf.release();
 }