+2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * lyxserver.C (callback): adjust
+
+ * lyxfunc.C (getStatus): add a missing brace in commented code
+ (ensureBufferClean): reindent
+ (dispatch): delete version taking a string
+
2003-10-11 Lars Gullik Bjønnes <larsbj@gullik.net>
* LaTeX.C (deplog): move found file handlig from here...
+2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * ControlCommandBuffer.C (dispatch): adjust for dispatch change
+
2003-10-08 Angus Leeming <leeming@lyx.org>
Fix doxygen warnings.
#include "bufferview_funcs.h"
#include "lyxfunc.h"
#include "LyXAction.h"
+#include "funcrequest.h"
#include "frontends/LyXView.h"
#include "support/lyxalgo.h"
#include "support/lstrings.h"
history_.push_back(str);
history_pos_ = history_.end();
- lv_.getLyXFunc().dispatch(str, true);
+ lv_.getLyXFunc().dispatch(lyxaction.lookupFunc(str), true);
}
+2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * lyx_gui.C (start): adjust for distpatch change
+
2003-10-08 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* qfont_loader.C: add #include (needed for LyX/Mac)
2003-10-06 Michael Schmitt <michael.schmitt@teststep.org>
- * QDelimiterDialog.h:
- * QMathDialog.h:
- * QSearchDialog.h:
- * floatplacement.h:
- * iconpalette.h:
+ * QDelimiterDialog.h:
+ * QMathDialog.h:
+ * QSearchDialog.h:
+ * floatplacement.h:
+ * iconpalette.h:
* panelstack.h: add #include <string>.
2003-10-01 Vitaly Lipatov <lav@vl3143.spb.edu>
// FIXME: move this stuff out again
#include "bufferlist.h"
+#include "LyXAction.h"
#include "lyxfunc.h"
#include "lyxrc.h"
#include "lyxserver.h"
// handle the batch commands the user asked for
if (!batch.empty()) {
- view.getLyXFunc().dispatch(batch);
+ view.getLyXFunc().dispatch(lyxaction.lookupFunc(batch));
}
qApp->exec();
+2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
+
+ * lyx_gui.C (start): adjust for dispatch change
+
2003-10-07 Angus Leeming <leeming@lyx.org>
* FormExternal.[Ch]:
#include "bufferlist.h"
#include "BufferView.h"
#include "debug.h"
+#include "funcrequest.h"
#include "gettext.h"
#include "LColor.h"
#include "lyx_main.h"
+#include "LyXAction.h"
#include "lyxfunc.h"
#include "lyxrc.h"
#include "lyxserver.h"
// handle the batch commands the user asked for
if (!batch.empty())
- view.getLyXFunc().dispatch(batch);
+ view.getLyXFunc().dispatch(lyxaction.lookupFunc(batch));
// enter the event loop
while (!finished) {
for (; it != end; ++it) {
if (it->inset == inset) {
lyxerr << "InsetText::lockInsetInInset: 1 a" << endl;
- text_.setCursorIntern(
+ text_.setCursorIntern(
std::distance(paragraphs.begin(), pit), it->pos);
lyxerr << "InsetText::lockInsetInInset: 1 b" << endl;
lyxerr << "bv: " << bv << " inset: " << inset << endl;
if (cmd.argument.size()) {
if (cmd.argument == "left")
text_.setCursorIntern(0, 0);
- else
+ else
text_.setCursor(paragraphs.size() - 1, paragraphs.back().size());
} else {
int tmp_y = (cmd.y < 0) ? 0 : cmd.y;
break;
}
flag.setOnOff(ev.argument[0] == align);
- } else
+ } else {
disable = true;
char align = mathcursor->halign();
}
-void LyXFunc::dispatch(string const & s, bool verbose)
-{
- FuncRequest func = lyxaction.lookupFunc(s);
-
- if (func.action == LFUN_UNKNOWN_ACTION) {
- owner->message(bformat(_("Unknown function (%1$s)"), s));
- return;
- }
-
- dispatch(func, verbose);
-}
-
-
namespace {
- bool ensureBufferClean(BufferView * bv) {
-
- Buffer & buf = *bv->buffer();
- if (buf.isClean())
- return true;
-
- string const file = MakeDisplayPath(buf.fileName(), 30);
- string text = bformat(_("The document %1$s has unsaved "
- "changes.\n\nDo you want to save "
- "the document?"), file);
- int const ret = Alert::prompt(_("Save changed document?"),
- text, 0, 1, _("&Save"),
- _("&Cancel"));
-
- if (ret == 0)
- bv->owner()->dispatch(FuncRequest(LFUN_MENUWRITE));
- return buf.isClean();
- }
+bool ensureBufferClean(BufferView * bv)
+{
+ Buffer & buf = *bv->buffer();
+ if (buf.isClean())
+ return true;
+
+ string const file = MakeDisplayPath(buf.fileName(), 30);
+ string text = bformat(_("The document %1$s has unsaved "
+ "changes.\n\nDo you want to save "
+ "the document?"), file);
+ int const ret = Alert::prompt(_("Save changed document?"),
+ text, 0, 1, _("&Save"),
+ _("&Cancel"));
+
+ if (ret == 0)
+ bv->owner()->dispatch(FuncRequest(LFUN_MENUWRITE));
+
+ return buf.isClean();
+}
} //namespace anon
// FINISHED means that the cursor should be
// one position after the inset.
}
-
+
if (result == FINISHED_RIGHT) {
view()->text->cursorRight(view());
moveCursorUpdate();
owner->clearMessage();
goto exit_with_message;
}
-
+
if (result == FINISHED_DOWN) {
RowList::iterator const irow = view()->text->cursorIRow();
if (irow != view()->text->lastRow()) {
while (!argument.empty()) {
string first;
argument = split(argument, first, ';');
- dispatch(first);
+ dispatch(lyxaction.lookupFunc(first));
}
}
break;
/// LyX dispatcher, executes lyx actions.
void dispatch(FuncRequest const &, bool verbose = false);
- /// Dispatch via a string argument
- void dispatch(std::string const & s, bool verbose = false);
-
/// return the status bar state string
std::string const view_status_message();
#include "lyxserver.h"
#include "debug.h"
+#include "funcrequest.h"
+#include "LyXAction.h"
#include "lyxfunc.h"
#include "support/lstrings.h"
#include "support/lyxlib.h"
// support currently. (Lgb)
- serv->func->dispatch(cmd + ' ' + arg);
+ serv->func->dispatch(FuncRequest(lyxaction.lookupFunc(cmd), arg));
string const rval = serv->func->getMessage();
//modified june 1999 stefano@zool.su.se:
deleted = true;
- bool selection_position_was_oldcursor_position =
+ bool selection_position_was_oldcursor_position =
selection.cursor.par() == old_cursor.par()
&& selection.cursor.pos() == old_cursor.pos();