#include "frontends/Dialogs.h"
#include "frontends/FileDialog.h"
#include "frontends/FontLoader.h"
-#include "frontends/Gui.h"
#include "frontends/KeySymbol.h"
#include "frontends/LyXView.h"
#include "frontends/Selection.h"
namespace Alert = frontend::Alert;
extern bool quitting;
+extern bool use_gui;
namespace {
break;
}
case LFUN_WINDOW_CLOSE: {
- enable = (theApp()->gui().viewIds().size() > 1);
+ enable = (theApp()->viewIds().size() > 1);
break;
}
// (leaving the event loop).
lyx_view_->message(from_utf8(N_("Exiting.")));
if (theBufferList().quitWriteAll())
- theApp()->gui().closeAllViews();
+ theApp()->closeAllViews();
break;
case LFUN_BUFFER_AUTO_SAVE:
break;
}
- case LFUN_DIALOG_HIDE:
- LyX::cref().hideDialogs(argument, 0);
+ case LFUN_DIALOG_HIDE: {
+ if (quitting || !use_gui)
+ break;
+ theApp()->hideDialogs(argument, 0);
break;
+ }
case LFUN_DIALOG_TOGGLE: {
BOOST_ASSERT(lyx_view_);