diff --git a/src/lyx_cb.C b/src/lyx_cb.C index 4ca5a5a0ff..d61ebf3d1b 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -34,6 +34,7 @@ #include "frontends/Alert.h" #include "frontends/Application.h" #include "frontends/FileDialog.h" +#include "frontends/LyXView.h" #include "support/filefilterlist.h" #include "support/filetools.h" @@ -404,10 +405,10 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap // This function runs "configure" and then rereads lyx.defaults to // reconfigure the automatic settings. -void reconfigure(BufferView * bv) +void reconfigure(LyXView & lv) { // emit message signal. - bv->buffer()->message(_("Running configure...")); + lv.message(_("Running configure...")); // Run configure in user lyx directory support::Path p(package().user_support()); @@ -416,7 +417,7 @@ void reconfigure(BufferView * bv) one.startscript(Systemcall::Wait, configure_command); p.pop(); // emit message signal. - bv->buffer()->message(_("Reloading configuration...")); + lv.message(_("Reloading configuration...")); lyxrc.read(libFileSearch(string(), "lyxrc.defaults")); // Re-read packages.lst LaTeXFeatures::getAvailable(); diff --git a/src/lyx_cb.h b/src/lyx_cb.h index 246799d26c..da520d82b1 100644 --- a/src/lyx_cb.h +++ b/src/lyx_cb.h @@ -18,6 +18,7 @@ namespace lyx { class Buffer; class BufferView; +class LyXView; /// extern bool quitting; @@ -35,7 +36,7 @@ void insertAsciiFile(BufferView * bv, std::string const & f, bool asParagraph); /// std::string getContentsOfAsciiFile(BufferView * bv, std::string const & f, bool asParagraph); /// -void reconfigure(BufferView * bv); +void reconfigure(LyXView & lv); } // namespace lyx diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 3c1a0f8a6a..c56556c2fd 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -1055,7 +1055,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd) break; case LFUN_RECONFIGURE: - reconfigure(view()); + BOOST_ASSERT(lyx_view_); + reconfigure(*lyx_view_); break; case LFUN_HELP_OPEN: {