#include "Session.h"
#include "version.h"
+#include "support/assert.h"
#include "support/debug.h"
#include "support/ExceptionMessage.h"
#include "support/FileName.h"
case WarningException:
Alert::warning(e.title_, e.details_);
return false;
- };
+ }
}
catch (exception const & e) {
docstring s = _("LyX has caught an exception, it will now "
bool GuiApplication::unregisterView(int id)
{
updateIds(views_, view_ids_);
- BOOST_ASSERT(views_.find(id) != views_.end());
- BOOST_ASSERT(views_[id]);
+ LASSERT(views_.find(id) != views_.end(), /**/);
+ LASSERT(views_[id], /**/);
map<int, GuiView *>::iterator it;
for (it = views_.begin(); it != views_.end(); ++it) {
GuiView & GuiApplication::view(int id) const
{
- BOOST_ASSERT(views_.find(id) != views_.end());
+ LASSERT(views_.find(id) != views_.end(), /**/);
return *views_.find(id)->second;
}
global_menubar_->grabKeyboard();
}
+
////////////////////////////////////////////////////////////////////////
+//
// X11 specific stuff goes here...
+
#ifdef Q_WS_X11
bool GuiApplication::x11EventFilter(XEvent * xev)
{
} // namespace frontend
+void hideDialogs(std::string const & name, Inset * inset)
+{
+ if (theApp())
+ theApp()->hideDialogs(name, inset);
+}
+
+
////////////////////////////////////////////////////////////////////
//
// Font stuff
frontend::FontLoader & theFontLoader()
{
- BOOST_ASSERT(frontend::guiApp);
+ LASSERT(frontend::guiApp, /**/);
return frontend::guiApp->fontLoader();
}
frontend::FontMetrics const & theFontMetrics(FontInfo const & f)
{
- BOOST_ASSERT(frontend::guiApp);
+ LASSERT(frontend::guiApp, /**/);
return frontend::guiApp->fontLoader().metrics(f);
}
+////////////////////////////////////////////////////////////////////
+//
+// Misc stuff
+//
+////////////////////////////////////////////////////////////////////
+
frontend::Clipboard & theClipboard()
{
- BOOST_ASSERT(frontend::guiApp);
+ LASSERT(frontend::guiApp, /**/);
return frontend::guiApp->clipboard();
}
frontend::Selection & theSelection()
{
- BOOST_ASSERT(frontend::guiApp);
+ LASSERT(frontend::guiApp, /**/);
return frontend::guiApp->selection();
}