X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbufferlist.C;h=e4497ba2343298619a505eef8b2dd88d9a08af2f;hb=e059c633b01937f450ff9fa873cfc6b773aa74cc;hp=6490d0d01675c91f4d10780651cd8e075c09c5d3;hpb=85798535a19919e82cc94a177a8414c542a9c5bf;p=lyx.git diff --git a/src/bufferlist.C b/src/bufferlist.C index 6490d0d016..e4497ba234 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -31,6 +31,7 @@ #include "lyxrc.h" #include "lyxtext.h" #include "lyx_cb.h" +#include "bufferview_funcs.h" #include "gettext.h" #include "LyXView.h" #include "vc-backend.h" @@ -38,6 +39,7 @@ extern BufferView * current_view; // called too many times in this file... +using std::vector; using std::find; using std::endl; @@ -152,7 +154,7 @@ bool BufferList::close(Buffer * buf) if (buf->getUser()) buf->getUser()->insetUnlock(); if (buf->paragraph && !buf->isLyxClean() && !quitting) { - ProhibitInput(); + ProhibitInput(buf->getUser()); switch(AskConfirmation(_("Changes in document:"), MakeDisplayPath(buf->fileName(), 50), _("Save document?"))){ @@ -160,15 +162,15 @@ bool BufferList::close(Buffer * buf) if (buf->save()) { lastfiles->newFile(buf->fileName()); } else { - AllowInput(); + AllowInput(buf->getUser()); return false; } break; case 3: // Cancel - AllowInput(); + AllowInput(buf->getUser()); return false; } - AllowInput(); + AllowInput(buf->getUser()); } bstore.release(buf); @@ -464,7 +466,7 @@ Buffer * BufferList::loadLyXFile(string const & filename, bool tolastfiles) 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.