#include "lyxrc.h"
#include "lyxtext.h"
#include "lyx_cb.h"
+#include "bufferview_funcs.h"
#include "gettext.h"
#include "LyXView.h"
#include "vc-backend.h"
extern BufferView * current_view; // called too many times in this file...
+using std::vector;
using std::find;
+using std::endl;
//
// Class BufferStorage
bool BufferList::close(Buffer * buf)
{
- if (buf->getUser()) buf->getUser()->insetUnlock();
+ // CHECK
+ // Trace back why we need to use buf->getUser here.
+ // Perhaps slight rewrite is in order? (Lgb)
+ if (buf->getUser()) buf->getUser()->insetUnlock();
if (buf->paragraph && !buf->isLyxClean() && !quitting) {
- ProhibitInput();
+ if (buf->getUser()) ProhibitInput(buf->getUser());
switch(AskConfirmation(_("Changes in document:"),
MakeDisplayPath(buf->fileName(), 50),
_("Save document?"))){
case 1: // Yes
- if (buf->save(lyxrc.make_backup)) {
+ if (buf->save()) {
lastfiles->newFile(buf->fileName());
} else {
- AllowInput();
+ if (buf->getUser()) AllowInput(buf->getUser());
return false;
}
break;
case 3: // Cancel
- AllowInput();
+ if (buf->getUser()) AllowInput(buf->getUser());
return false;
}
- AllowInput();
+ if (buf->getUser()) AllowInput(buf->getUser());
}
bstore.release(buf);
if (!(*it)->isDepClean(mastertmpdir)) {
string writefile = mastertmpdir;
writefile += '/';
- writefile += ChangeExtension((*it)->fileName(),
- ".tex", true);
+ writefile += (*it)->getLatexName();
(*it)->makeLaTeXFile(writefile, mastertmpdir,
false, true);
(*it)->markDepClean(mastertmpdir);
if (LyXVC::file_not_found_hook(s)) {
// Ask if the file should be checked out for
// viewing/editing, if so: load it.
- if (AskQuestion(_("Do you want to retrive file under version control?"))) {
+ if (AskQuestion(_("Do you want to retrieve file under version control?"))) {
// How can we know _how_ to do the checkout?
// With the current VC support it has to be,
// a RCS file since CVS do not have special ,v files.