* LyX, The Document Word Processor
*
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-2000 The LyX Team.
+ * Copyright 1995-2001 The LyX Team.
*
- * This file is Copyright 1996-2000
+ * This file is Copyright 1996-2001
* Lars Gullik Bjønnes
*
* ======================================================
#include <config.h>
+#include <assert.h>
#include <algorithm>
#include <functional>
#include "lyxtext.h"
#include "lyx_cb.h"
#include "bufferview_funcs.h"
+#include "BufferView.h"
#include "gettext.h"
#include "LyXView.h"
#include "vc-backend.h"
}
-bool BufferList::QwriteAll()
+bool BufferList::qwriteAll()
{
bool askMoreConfirmation = false;
string unsaved;
}
-void BufferList::resize()
-{
- for_each(bstore.begin(), bstore.end(), mem_fun(&Buffer::resize));
-}
-
-
bool BufferList::close(Buffer * buf)
{
lyx::Assert(buf);
if (buf->getUser()) buf->getUser()->insetUnlock();
if (buf->paragraph && !buf->isLyxClean() && !quitting) {
if (buf->getUser())
- ProhibitInput(buf->getUser());
+ buf->getUser()->owner()->prohibitInput();
string fname;
if (buf->isUnnamed())
fname = OnlyFilename(buf->fileName());
reask = false;
} else {
if (buf->getUser())
- AllowInput(buf->getUser());
+ buf->getUser()->owner()->allowInput();
return false;
}
break;
break;
case 3: // Cancel
if (buf->getUser())
- AllowInput(buf->getUser());
+ buf->getUser()->owner()->allowInput();
return false;
}
}
if (buf->getUser())
- AllowInput(buf->getUser());
+ buf->getUser()->owner()->allowInput();
}
bstore.release(buf);
if (tname.empty()) {
tname = LibFileSearch("templates", "defaults.lyx");
}
- if (!tname.empty() && IsLyXFilename(tname)) {
+ if (!tname.empty()) {
bool templateok = false;
LyXLex lex(0, 0);
lex.setFile(tname);
WriteAlert(_("Error!"), _("Unable to open template"),
MakeDisplayPath(tname));
// no template, start with empty buffer
- b->paragraph = new LyXParagraph;
+ b->paragraph = new Paragraph;
}
} else { // start with empty buffer
- b->paragraph = new LyXParagraph;
+ b->paragraph = new Paragraph;
}
if (!lyxrc.new_ask_filename && !isNamed) {