#include "Lexer.h"
#include "LyXRC.h"
#include "Row.h"
-#include "LyXServer.h"
-#include "LyXTextClassList.h"
+#include "Server.h"
+#include "TextClassList.h"
#include "LyXVC.h"
#include "Paragraph.h"
#include "ParIterator.h"
break;
}
+ case LFUN_DIALOG_TOGGLE:
+ flag.setOnOff(lyx_view_->getDialogs().visible(cmd.getArg(0)));
+ // fall through to set "enable"
case LFUN_DIALOG_SHOW: {
string const name = cmd.getArg(0);
if (!buf)
case LFUN_BUFFER_UPDATE:
case LFUN_BUFFER_VIEW:
case LFUN_BUFFER_IMPORT:
- case LFUN_TOC_VIEW:
case LFUN_BUFFER_AUTO_SAVE:
case LFUN_RECONFIGURE:
case LFUN_HELP_OPEN:
theApp()->gui().closeAllViews();
break;
- case LFUN_TOC_VIEW: {
- BOOST_ASSERT(lyx_view_);
- InsetCommandParams p("tableofcontents");
- string const data = InsetCommandMailer::params2string("toc", p);
- lyx_view_->getDialogs().show("toc", data, 0);
- break;
- }
-
case LFUN_BUFFER_AUTO_SAVE:
autoSave(view());
break;
case LFUN_SERVER_NOTIFY:
dispatch_buffer = keyseq->print(false);
- theLyXServer().notifyClient(to_utf8(dispatch_buffer));
+ theServer().notifyClient(to_utf8(dispatch_buffer));
break;
case LFUN_SERVER_GOTO_FILE_ROW: {
Dialogs::hide(argument, 0);
break;
+ case LFUN_DIALOG_TOGGLE: {
+ BOOST_ASSERT(lyx_view_);
+ if (lyx_view_->getDialogs().visible(cmd.getArg(0)))
+ dispatch(FuncRequest(LFUN_DIALOG_HIDE, argument));
+ else
+ dispatch(FuncRequest(LFUN_DIALOG_SHOW, argument));
+ break;
+ }
+
case LFUN_DIALOG_DISCONNECT_INSET:
BOOST_ASSERT(lyx_view_);
lyx_view_->getDialogs().disconnect(argument);