X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbufferview_funcs.C;h=7ab2815f37e98e8d186a80d11f2de3586fd7fd98;hb=21226de2b87a86be19fff025cace3d286a75aa76;hp=f32ba3254ab17d0588e5f88e3730af6f6a89b8e4;hpb=8254b16fd11fea6224e4db951839747e642115d3;p=lyx.git diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index f32ba3254a..7ab2815f37 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -19,15 +19,17 @@ #include "BufferView.h" #include "paragraph.h" #include "lyxfont.h" -#include "lyx_gui_misc.h" #include "lyxtext.h" #include "buffer.h" -#include "support/lstrings.h" #include "lyx_cb.h" #include "language.h" #include "gettext.h" #include "ParagraphParameters.h" +#include "lyxtextclasslist.h" + +#include "frontends/Alert.h" +#include "support/lstrings.h" void emph(BufferView * bv) { @@ -68,20 +70,10 @@ void lang(BufferView * bv, string const & l) font.setLanguage(lang); toggleAndShow(bv, font); } else - WriteAlert(_("Error! unknown language"),l); + Alert::alert(_("Error! unknown language"),l); } -#ifndef NO_LATEX -void tex(BufferView * bv) -{ - LyXFont font(LyXFont::ALL_IGNORE); - font.setLatex (LyXFont::TOGGLE); - toggleAndShow(bv, font); -} -#endif - - // Change environment depth. // if decInc >= 0, increment depth // if decInc < 0, decrement depth @@ -130,7 +122,11 @@ void roman(BufferView * bv) void styleReset(BufferView * bv) { +#ifndef INHERIT_LANG + LyXFont font(LyXFont::ALL_INHERIT, ignore_language); +#else LyXFont font(LyXFont::ALL_INHERIT); +#endif toggleAndShow(bv, font); } @@ -204,6 +200,9 @@ string const currentState(BufferView * bv) break; } } +#if 1 + state << _(", Paragraph: ") << text->cursor.par()->id(); +#endif } return state.str().c_str(); } @@ -229,11 +228,7 @@ void toggleAndShow(BufferView * bv, LyXFont const & font, bool toggleall) bv->update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE); if (font.language() != ignore_language || -#ifndef NO_LATEX - font.latex() != LyXFont::IGNORE || -#endif - font.number() != LyXFont::IGNORE) - { + font.number() != LyXFont::IGNORE) { LyXCursor & cursor = text->cursor; text->computeBidiTables(bv->buffer(), cursor.row()); if (cursor.boundary() !=