ifstream ifs(fname.c_str());
if (!ifs) {
- Alert::alert(_("Error!"),
- _("Cannot open specified file: "),
+ Alert::err_alert(_("Error! Cannot open specified file:"),
MakeDisplayPath(fname, 50));
return false;
}
}
-void BufferView::menuUndo()
+void BufferView::undo()
{
if (!available())
return;
}
-void BufferView::menuRedo()
+void BufferView::redo()
{
if (!available())
return;
}
+Encoding const * BufferView::getEncoding() const
+{
+ LyXText * t = getLyXText();
+ if (!t)
+ return 0;
+
+ LyXCursor const & c= t->cursor;
+ LyXFont const font = c.par()->getFont(buffer()->params, c.pos());
+ return font.language()->encoding();
+}
+
+
void BufferView::haveSelection(bool sel)
{
pimpl_->workarea().haveSelection(sel);