#include "mathed/formulamacro.h"
#include "mathed/math_cursor.h"
#include "mathed/math_inset.h"
-#include "spellchecker.h"
#include "minibuffer.h"
#include "vspace.h"
#include "LyXView.h"
bool tmp_sc = show_sc;
show_sc = false;
- Dispatch(action, argument);
+ dispatch(action, argument);
show_sc = tmp_sc;
//return 0;
void LyXFunc::miniDispatch(string const & s)
{
if (!s.empty()) {
- Dispatch(s);
+ dispatch(s);
}
}
-string const LyXFunc::Dispatch(string const & s)
+string const LyXFunc::dispatch(string const & s)
{
// Split command string into command and argument
string cmd;
string line = frontStrip(s);
string const arg = strip(frontStrip(split(line, cmd, ' ')));
- return Dispatch(lyxaction.LookupFunc(cmd), arg);
+ return dispatch(lyxaction.LookupFunc(cmd), arg);
}
-string const LyXFunc::Dispatch(int ac,
+string const LyXFunc::dispatch(int ac,
string const & do_not_use_this_arg)
{
lyxerr[Debug::ACTION] << "LyXFunc::Dispatch: action[" << ac
meta_fake_bit = 0;
if (owner->view()->available())
// cancel any selection
- Dispatch(LFUN_MARK_OFF);
+ dispatch(LFUN_MARK_OFF);
setMessage(N_("Cancel"));
break;
// --- Menus -----------------------------------------------
case LFUN_MENUNEW:
- MenuNew(false);
+ menuNew(false);
break;
case LFUN_MENUNEWTMPLT:
- MenuNew(true);
+ menuNew(true);
break;
case LFUN_CLOSEBUFFER:
- CloseBuffer();
+ closeBuffer();
break;
case LFUN_MENUWRITE:
#warning Find another implementation here (or another lyxfunc)!
#endif
#endif
- case LFUN_HELP_COPYRIGHT:
- owner->getDialogs()->showCopyright();
+ case LFUN_HELP_ABOUTLYX:
+ owner->getDialogs()->showAboutlyx();
break;
+ case LFUN_HELP_COPYRIGHT:
case LFUN_HELP_CREDITS:
- owner->getDialogs()->showCredits();
- break;
+
case LFUN_HELP_OPEN:
{
break;
}
- case LFUN_HELP_VERSION: {
- owner->prohibitInput();
- string msg(_("LyX Version "));
- msg += LYX_VERSION;
- msg += " of ";
- msg += LYX_RELEASE;
- fl_show_message(msg.c_str(),
- (_("Library directory: ")
- + MakeDisplayPath(system_lyxdir)).c_str(),
- (_("User directory: ")
- + MakeDisplayPath(user_lyxdir)).c_str());
- owner->allowInput();
- break;
- }
+ case LFUN_HELP_VERSION:
// --- version control -------------------------------
case LFUN_VC_REGISTER:
break;
case LFUN_FILE_OPEN:
- Open(argument);
+ open(argument);
break;
case LFUN_LATEX_LOG:
--sel; // sel 1..., but layout 0...
// Pretend we got the name instead.
- Dispatch(int(LFUN_LAYOUT),
+ dispatch(int(LFUN_LAYOUT),
textclasslist.NameOfLayout(owner->view()
->buffer()->params.textclass,
sel));
case LFUN_SPELLCHECK:
if (lyxrc.isp_command != "none")
- ShowSpellChecker(owner->view());
- break; // RVDK_PATCH_5
+ owner->getDialogs()->showSpellchecker();
+ break;
// --- lyxserver commands ----------------------------
} else {
p.setContents( argument );
}
- Dispatch(LFUN_CITATION_INSERT, p.getAsString());
+ dispatch(LFUN_CITATION_INSERT, p.getAsString());
} else
owner->getDialogs()->createCitation( p.getAsString() );
}
while (argument.find(';') != string::npos) {
string first;
argument = split(argument, first, ';');
- Dispatch(first);
+ dispatch(first);
}
}
break;
// Then if it was none of the above
if (!owner->view()->Dispatch(action, argument))
lyxerr << "A truly unknown func ["
- << action << "]!" << endl;
+ << lyxaction.getActionName(action) << "]!"
+ << endl;
break;
} // end of switch
}
-void LyXFunc::MenuNew(bool fromTemplate)
+void LyXFunc::menuNew(bool fromTemplate)
{
string initpath = lyxrc.document_path;
}
-void LyXFunc::Open(string const & fname)
+void LyXFunc::open(string const & fname)
{
string initpath = lyxrc.document_path;
}
-void LyXFunc::CloseBuffer()
+void LyXFunc::closeBuffer()
{
if (bufferlist.close(owner->buffer()) && !quitting) {
if (bufferlist.empty()) {