*
* \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>
#include <functional>
+using namespace lyx::support;
+
using std::vector;
using std::find;
using std::endl;
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 !
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
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()) {
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()) {
writefile += '/';
writefile += (*it)->getLatexName();
(*it)->makeLaTeXFile(writefile, mastertmpdir,
- runparams, true);
+ runparams, false);
(*it)->markDepClean(mastertmpdir);
}
}
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();