#include "buffer_funcs.h"
#include "BufferList.h"
#include "Converter.h"
+#include "CutAndPaste.h"
#include "debug.h"
#include "Encoding.h"
#include "ErrorList.h"
#include "LyXFunc.h"
#include "Lexer.h"
#include "LyXRC.h"
+#include "ModuleList.h"
#include "Server.h"
#include "ServerSocket.h"
#include "TextClassList.h"
}
-Buffer const * const LyX::updateInset(Inset const * inset) const
+Buffer const * LyX::updateInset(Inset const * inset) const
{
if (quitting || !inset)
return 0;
return !final_success;
}
- // Force adding of font path _before_ Application is initialized
- support::os::addFontResources();
-
// Let the frontend parse and remove all arguments that it knows
pimpl_->application_.reset(createApplication(argc, argv));
prepareExit();
- // Restore original font resources after Application is destroyed.
- support::os::restoreFontResources();
-
return exit_status;
}
void LyX::prepareExit()
{
+ // Clear the clipboard and selection stack:
+ cap::clearCutStack();
+ cap::clearSelection();
+
// Set a flag that we do quitting from the program,
// so no refreshes are necessary.
quitting = true;
// FIXME: Switch to the last loaded Buffer. This must not be the first one
// because the Buffer won't be connected in this case. The correct solution
// would be to avoid the manual connection of the current Buffer in LyXView.
- view->setBuffer(pimpl_->buffer_list_.last());
+ if (!pimpl_->buffer_list_.empty())
+ view->setBuffer(pimpl_->buffer_list_.last());
}
LYXERR(Debug::INIT) << "Reading layouts..." << endl;
if (!LyXSetStyle())
return false;
+ //...and the modules
+ moduleList.load();
if (use_gui) {
// Set the language defined by the user.
first_start = false;
return needsUpdate("lyxrc.defaults")
+ || needsUpdate("lyxmodules.lst")
|| needsUpdate("textclass.lst")
|| needsUpdate("packages.lst");
}