]> git.lyx.org Git - lyx.git/blobdiff - src/bufferlist.C
* remove various xforms relicts, in particular:
[lyx.git] / src / bufferlist.C
index 5b9826471b992ec587f255cac4599cf8c7f91795..c86abdc837bf1af76fa2b204cf7b715d9ce11498 100644 (file)
@@ -90,9 +90,9 @@ bool BufferList::quitWriteBuffer(Buffer * buf)
                bool succeeded;
 
                if (buf->isUnnamed())
-                       succeeded = WriteAs(buf);
+                       succeeded = writeAs(buf);
                else
-                       succeeded = MenuWrite(buf);
+                       succeeded = menuWrite(buf);
 
                if (!succeeded)
                        return false;
@@ -122,6 +122,15 @@ bool BufferList::quitWriteAll()
                if (!quitWriteBuffer(*it))
                        return false;
        }
+       // now, all buffers have been written sucessfully
+       // save file names to .lyx/session
+       it = bstore.begin();
+       for (; it != end; ++it) {
+               // if master/slave are both open, do not save slave since it 
+               // will be automatically loaded when the master is loaded
+               if ((*it)->getMasterBuffer() == (*it))
+                       LyX::ref().session().addLastOpenedFile((*it)->fileName());
+       }
 
        return true;
 }
@@ -184,7 +193,7 @@ bool BufferList::close(Buffer * buf, bool const ask)
 
        if (ret == 0) {
                if (buf->isUnnamed()) {
-                       if (!WriteAs(buf))
+                       if (!writeAs(buf))
                                return false;
                } else if (buf->save()) {
                        LyX::ref().session().addLastFile(buf->fileName());