]> git.lyx.org Git - lyx.git/blobdiff - src/bufferlist.C
Move #includes out of header files.
[lyx.git] / src / bufferlist.C
index 7d7b327b4e63cf95ffa742931b4ef7fcf752c482..de6b49f5bcaebcffb1ab80418b2b16358bd052b8 100644 (file)
@@ -5,7 +5,7 @@
  *
  * \author Lars Gullik Bjønnes
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
@@ -41,6 +41,8 @@
 #include <functional>
 
 
+using namespace lyx::support;
+
 using std::vector;
 using std::find;
 using std::endl;
@@ -68,9 +70,9 @@ bool BufferList::quitWriteBuffer(Buffer * buf)
                file = MakeDisplayPath(buf->fileName(), 30);
 
        string text = bformat(_("The document %1$s has unsaved changes.\n\n"
-               "Do you want to save the document?"), file);
+               "Do you want to save the document or discard the changes?"), file);
        int const ret = Alert::prompt(_("Save changed document?"),
-               text, 0, 2, _("&Save Changes"), _("&Discard Changes"), _("&Cancel"));
+               text, 0, 2, _("&Save"), _("&Discard"), _("&Cancel"));
 
        if (ret == 0) {
                // FIXME: WriteAs can be asynch !
@@ -118,7 +120,7 @@ bool BufferList::quitWriteAll()
 
 void BufferList::release(Buffer * buf)
 {
-       lyx::Assert(buf);
+       Assert(buf);
        BufferStorage::iterator it = find(bstore.begin(), bstore.end(), buf);
        if (it != bstore.end()) {
                // Make sure that we don't store a LyXText in
@@ -157,7 +159,7 @@ void BufferList::closeAll()
 
 bool BufferList::close(Buffer * buf, bool ask)
 {
-       lyx::Assert(buf);
+       Assert(buf);
 
        // FIXME: is the quitting check still necessary ?
        if (!ask || buf->isClean() || quitting || buf->paragraphs.empty()) {
@@ -172,9 +174,9 @@ bool BufferList::close(Buffer * buf, bool ask)
                fname = MakeDisplayPath(buf->fileName(), 30);
 
        string text = bformat(_("The document %1$s has unsaved changes.\n\n"
-               "Do you want to save the document?"), fname);
+               "Do you want to save the document or discard the changes?"), fname);
        int const ret = Alert::prompt(_("Save changed document?"),
-               text, 0, 2, _("&Save Changes"), _("&Discard Changes"), _("&Cancel"));
+               text, 0, 2, _("&Save"), _("&Discard"), _("&Cancel"));
 
        if (ret == 0) {
                if (buf->isUnnamed()) {
@@ -234,7 +236,7 @@ void BufferList::updateIncludedTeXfiles(string const & mastertmpdir,
                        writefile += '/';
                        writefile += (*it)->getLatexName();
                        (*it)->makeLaTeXFile(writefile, mastertmpdir,
-                                            runparams, true);
+                                            runparams, false);
                        (*it)->markDepClean(mastertmpdir);
                }
        }
@@ -316,8 +318,8 @@ bool BufferList::exists(string const & s) const
 
 bool BufferList::isLoaded(Buffer const * b) const
 {
-       lyx::Assert(b);
-
+       Assert(b);
+       
        BufferStorage::const_iterator cit =
                find(bstore.begin(), bstore.end(), b);
        return cit != bstore.end();