#include "support/FileInfo.h"
#include "lyxscreen.h"
#include "support/filetools.h"
-#include "lyx_gui_misc.h"
+#include "frontends/Alert.h"
#include "LaTeX.h"
#include "BufferView_pimpl.h"
#include "insets/insetcommand.h" //ChangeRefs
FileInfo const fi(fname);
if (!fi.readable()) {
- WriteAlert(_("Error!"),
+ Alert::alert(_("Error!"),
_("Specified file is unreadable: "),
MakeDisplayPath(fname, 50));
return false;
ifstream ifs(fname.c_str());
if (!ifs) {
- WriteAlert(_("Error!"),
+ Alert::alert(_("Error!"),
_("Cannot open specified file: "),
MakeDisplayPath(fname, 50));
return false;
}
- char const c = ifs.peek();
+ int const c = ifs.peek();
LyXLex lex(0, 0);
lex.setStream(ifs);
{
if (available()) {
text->copyEnvironmentType();
- // clear the selection, even if mark_set
- toggleSelection();
- text->clearSelection();
- update(text, BufferView::SELECT|BufferView::FITCUR);
owner()->message(_("Paragraph environment type copied"));
}
}
{
if (available()) {
text->copySelection(this);
- // clear the selection, even if mark_set
- toggleSelection();
- text->clearSelection();
- update(text, BufferView::SELECT|BufferView::FITCUR);
owner()->message(_("Copy"));
}
}
return string();
}
- return text->selectNextWord(this, value);
+ return text->selectNextWordToSpellcheck(this, value);
}
bool BufferView::lockInset(UpdatableInset * inset)
{
+ // don't relock if we're already locked
+ if (theLockingInset() == inset)
+ return true;
if (!theLockingInset() && inset) {
theLockingInset(inset);
return true;
Inset * locking_inset = theLockingInset()->getLockingInset();
if ((cursor.pos() - 1 >= 0) &&
- (cursor.par()->getChar(cursor.pos() - 1) ==
- Paragraph::META_INSET) &&
+ cursor.par()->isInset(cursor.pos() - 1) &&
(cursor.par()->getInset(cursor.pos() - 1) ==
locking_inset))
text->setCursor(this, cursor,