]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
update no.po
[lyx.git] / src / BufferView.C
index 35967e636e816fa134f504fcc671879eb42448d2..95c03e8450eb9324ab1c77ffb0acff37f8daf540 100644 (file)
@@ -300,8 +300,7 @@ bool BufferView::insertLyXFile(string const & filen)
 
        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;
        }
@@ -933,6 +932,18 @@ Language const * BufferView::getParentLanguage(Inset * inset) const
 }
 
 
+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);