if (cursor.par()->params().spaceTop() == VSpace(VSpace::NONE)) {
lt->setParagraph
(bv_,
- cursor.par()->params().lineTop(),
+ cursor.par()->params().lineTop(),
cursor.par()->params().lineBottom(),
- cursor.par()->params().pagebreakTop(),
+ cursor.par()->params().pagebreakTop(),
cursor.par()->params().pagebreakBottom(),
VSpace(VSpace::DEFSKIP), cursor.par()->params().spaceBottom(),
- cursor.par()->params().spacing(),
- cursor.par()->params().align(),
+ cursor.par()->params().spacing(),
+ cursor.par()->params().align(),
cursor.par()->params().labelWidthString(), 1);
//update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
update(lt, BufferView::SELECT|BufferView::FITCUR);
InsetSpecialChar * new_inset =
new InsetSpecialChar(kind);
- insertInset(new_inset);
- // Ok, what happens here if we are unable to insert
- // the inset? Leak it?
+ if (!insertInset(new_inset))
+ delete new_inset;
}
}
+2002-01-12 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * LyXAction.[Ch]: move isPseudoAction to the C file, since nobody
+ should need to care about that.
+
+ * lyxfunc.C (verboseDispatch): simplify a bit
+ (getStatus): have a version which takes a pseudoaction, and
+ another which requires a (kb_action,string).
+
+ * LyXAction.C (retrieveActionArg): make it work also when action
+ is not a pseudo-action.
+ (getActionName): simplify a bit
+ (helpText):
+
+2002-01-11 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * lyxfunc.C (verboseDispatch): new families of methods with
+ several ways to specify a command and a bool to indicate whether
+ the command name and shortcut should be displayed in minibuffer
+ (eventually, we could extend that to a finer bitmask like
+ SHORTCUT|CMDNAME|CMDRESULT, or whatever).
+ (dispatch): the pristine dispatch command which just, well,
+ dispatchs! Note it still sets its result to minibuffer; I'm not
+ sure we want that.
+
+ * lyxfunc.h: remove setHintMessage
+
+ * vc-backend.C: use LFUN_MENURELOAD instead of "buffer-reload"
+
+2002-01-10 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * BufferView_pimpl.C (specialChar): delete new inset if we have
+ not been able to insert it.
+
+ * kbmap.C: revert to using int instead of kb_action, since all we
+ are dealing with is pseudo-actions.
+
+ * LyXAction.C (searchActionArg): change to return int instead of
+ kb_action, since the result is a pseudoaction.
+
2002-01-12 Dekel Tsur <dekelts@tau.ac.il>
* buffer.C (insertErtContents): Fix (partially) the font bug.
// These are globals.
LyXAction lyxaction;
+// Small helper function
+inline
+bool isPseudoAction(int a)
+{
+ return a > int(LFUN_LASTACTION);
+}
+
+
+
void LyXAction::newFunc(kb_action action, string const & name,
string const & helpText, unsigned int attrib)
{
// Search for an existent pseudoaction, return LFUN_UNKNOWN_ACTION
// if it doesn't exist.
-kb_action LyXAction::searchActionArg(kb_action action, string const & arg) const
+int LyXAction::searchActionArg(kb_action action, string const & arg) const
{
arg_map::const_iterator pit = lyx_arg_map.find(action);
<< action << '|'
<< arg << "] = " << aci->second << endl;
- return kb_action(aci->second);
+ return aci->second;
}
{
arg.erase(); // clear it to be sure.
+ if (!isPseudoAction(pseudo))
+ return static_cast<kb_action>(pseudo);
+
pseudo_map::const_iterator pit = lyx_pseudo_map.find(pseudo);
if (pit != lyx_pseudo_map.end()) {
lyxerr[Debug::ACTION] << "Found the pseudoaction: ["
<< pit->second.action << '|'
- << pit->second.arg << '\n';
+ << pit->second.arg << "]\n";
arg = pit->second.arg;
return pit->second.action;
} else {
{
kb_action ac;
string arg;
- if (isPseudoAction(action)) {
- ac = retrieveActionArg(action, arg);
- arg.insert(0, " ");
- } else
- ac = static_cast<kb_action>(action);
+ ac = retrieveActionArg(action, arg);
+ if (!arg.empty())
+ arg.insert(0, " ");
+
info_map::const_iterator iit = lyx_info_map.find(ac);
if (iit != lyx_info_map.end()) {
string help, arg;
kb_action action;
- if (isPseudoAction(pseudoaction))
- action = retrieveActionArg(pseudoaction, arg);
- else
- action = static_cast<kb_action>(pseudoaction);
+ action = retrieveActionArg(pseudoaction, arg);
info_map::const_iterator ici = lyx_info_map.find(action);
if (ici != lyx_info_map.end()) {
///
LyXAction();
- /** Returns an action tag from a string. Returns kb_action.
- Include arguments in func_name ONLY if you
- want to create new pseudo actions. */
+ /** Returns an pseudoaction from a string
+ If you include arguments in func_name, a new psedoaction will be
+ created if needed. */
int LookupFunc(string const & func_name) const;
/** Returns an action tag which name is the most similar to a string.
kb_action retrieveActionArg(int i, string & arg) const;
/// Search for an existent pseudoaction, return -1 if it doesn't exist.
- kb_action searchActionArg(kb_action action, string const & arg) const;
+ int searchActionArg(kb_action action, string const & arg) const;
- /// Check if a value is a pseudo-action.
- bool isPseudoAction(int) const;
-
/// Return the name associated with command
string const getActionName(int action) const;
mutable arg_map lyx_arg_map;
};
-
-/* -------------------- Inlines ------------------ */
-
-
-inline
-bool LyXAction::isPseudoAction(int a) const
-{
- return a > int(LFUN_LASTACTION);
-}
-
#endif
// Connect the minibuffer signals
minibuffer->stringReady.connect(SigC::slot(getLyXFunc(),
- &LyXFunc::miniDispatch));
+ &LyXFunc::miniDispatch));
minibuffer->timeout.connect(SigC::slot(getLyXFunc(),
&LyXFunc::initMiniBuffer));
+2002-01-12 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * Toolbar_pimpl.C (setPixmap): simplify a bit
+
+2002-01-10 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * Toolbar_pimpl.C (ToolbarCB):
+ * Menubar_pimpl.C (MenuCallback): use verboseDispatch instead of
+ dispatch.
+
2002-01-12 Allan Rae <rae@lyx.org>
* FormTabular.C (FormTabular): Fix Purify UMR.
lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, '\\' + sym);
}
-void FormMathsPanel::dispatchFunc(string const & funcode) const
+
+void FormMathsPanel::dispatchFunc(kb_action action) const
{
- lv_->getLyXFunc()->dispatch(funcode);
+ lv_->getLyXFunc()->dispatch(action);
}
+
void FormMathsPanel::mathDisplay() const
{
lv_->getLyXFunc()->dispatch(LFUN_MATH_DISPLAY);
#ifndef FORM_MATHSPANEL_H
#define FORM_MATHSPANEL_H
+#include "commandtags.h"
#include <boost/smart_ptr.hpp>
#ifdef __GNUG_
/// dispatch a symbol insert
void insertSymbol(string const & sym) const;
/// dispatch an LFUN:
- void dispatchFunc(string const & funcode) const;
+ void dispatchFunc(kb_action action) const;
private:
/// Pointer to the actual instantiation of the ButtonController.
virtual xformsBC & bc();
#include "form_maths_style.h"
extern char * latex_mathstyle[];
-extern char * latex_mathfontcmds[];
+extern kb_action latex_mathfontcmds[];
FormMathsStyle::FormMathsStyle(LyXView * lv, Dialogs * d,
FormMathsPanel const & p)
// If the action value is too low, then it is not a
// valid action, but something else.
if (choice >= action_offset + 1) {
- view->getLyXFunc()->dispatch(choice - action_offset);
+ view->getLyXFunc()->verboseDispatch(choice - action_offset, true);
} else {
lyxerr[Debug::GUI]
<< "MenuCallback: ignoring bogus action "
{
XFormsView * owner = static_cast<XFormsView *>(ob->u_vdata);
- string res = owner->getLyXFunc()->dispatch(int(ac));
- if (!res.empty())
- lyxerr[Debug::GUI] << "ToolbarCB: Function returned: "
- << res << endl;
+ owner->getLyXFunc()->verboseDispatch(int(ac), true);
}
void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height)
{
- string name;
string arg;
string xpm_name;
- kb_action act;
- if (lyxaction.isPseudoAction(action)) {
- act = lyxaction.retrieveActionArg(action, arg);
- name = lyxaction.getActionName(act);
+ const kb_action act = lyxaction.retrieveActionArg(action, arg);
+ string const name = lyxaction.getActionName(act);
+ if (!arg.empty())
xpm_name = subst(name + ' ' + arg, ' ','_');
- } else {
- act = (kb_action)action;
- name = lyxaction.getActionName(action);
+ else
xpm_name = name;
- }
string fullname = LibFileSearch("images", xpm_name, "xpm");
#endif
#include "kbmap.h"
+#include "commandtags.h"
#include "kbsequence.h"
#include "debug.h"
}
-string::size_type kb_keymap::bind(string const & seq, kb_action action)
+string::size_type kb_keymap::bind(string const & seq, int action)
{
if (lyxerr.debugging(Debug::KBMAP)) {
lyxerr << "BIND: Sequence `"
}
-kb_action kb_keymap::lookup(unsigned int key,
+int kb_keymap::lookup(unsigned int key,
unsigned int mod, kb_sequence * seq) const
{
if (table.empty()) {
}
-void kb_keymap::defkey(kb_sequence * seq, kb_action action, unsigned int r)
+void kb_keymap::defkey(kb_sequence * seq, int action, unsigned int r)
{
unsigned int const code = seq->sequence[r];
if (code == NoSymbol) return;
}
-string const kb_keymap::findbinding(kb_action act, string const & prefix) const
+string const kb_keymap::findbinding(int act, string const & prefix) const
{
string res;
if (table.empty()) return res;
#include <list>
#include <boost/smart_ptr.hpp>
-#include "commandtags.h"
-
#include "LString.h"
class kb_sequence;
* @return 0 on success, or position in string seq where error
* occurs.
*/
- string::size_type bind(string const & seq, kb_action action);
+ string::size_type bind(string const & seq, int action);
/// print all available keysyms
string const print() const;
* @param seq the current key sequence so far
* @return the action / LFUN_PREFIX / LFUN_UNKNOWN_ACTION
*/
- kb_action lookup(unsigned int key,
- unsigned int mod, kb_sequence * seq) const;
+ int lookup(unsigned int key,
+ unsigned int mod, kb_sequence * seq) const;
/// Given an action, find all keybindings.
- string const findbinding(kb_action action,
+ string const findbinding(int action,
string const & prefix = string()) const;
/**
boost::shared_ptr<kb_keymap> table;
/// Action for !prefix keys
- kb_action action;
+ int action;
};
* Define an action for a key sequence.
* @param r internal recursion level
*/
- void defkey(kb_sequence * seq, kb_action action, unsigned int r = 0);
+ void defkey(kb_sequence * seq, int action, unsigned int r = 0);
/// Returns a string of the given key
string const printKey(kb_key const & key) const;
#include "kbsequence.h"
#include "kbmap.h"
+#include "commandtags.h"
#include "debug.h"
using std::endl;
enum { ModsMask = ShiftMask | ControlMask | Mod1Mask };
-kb_action kb_sequence::addkey(unsigned int key, unsigned int mod, unsigned int nmod)
+int kb_sequence::addkey(unsigned int key, unsigned int mod, unsigned int nmod)
{
// adding a key to a deleted sequence
// starts a new sequence
#include <vector>
#include "LString.h"
-#include "commandtags.h"
-
class kb_keymap;
/// Holds a key sequence and the current and standard keymaps
* @param nmod which modifiers to mask out for equality test
* @return the action matching this key sequence or LFUN_UNKNOWN_ACTION
*/
- kb_action addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0);
+ int addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0);
/**
* Add a sequence of keys from a string to the sequence
// otherwise, let the GUI handle the batch command
lyxGUI->regBuf(last_loaded);
- lyxGUI->getLyXView()->getLyXFunc()->dispatch(batch_command);
+ lyxGUI->getLyXView()->getLyXFunc()->verboseDispatch(batch_command, false);
// fall through...
}
/* === globals =========================================================== */
-// Initialization of static member var
-bool LyXFunc::show_sc = true;
-
LyXFunc::LyXFunc(LyXView * o)
: owner(o),
if (action == LFUN_SELFINSERT) {
// This is very X dependent.
unsigned int c = keysym;
+ string argument;
c = kb_keymap::getiso(c);
if (c > 0)
argument = static_cast<char>(c);
+
+ dispatch(LFUN_SELFINSERT, argument);
lyxerr[Debug::KEY] << "SelfInsert arg[`"
<< argument << "']" << endl;
}
-
- bool tmp_sc = show_sc;
- show_sc = false;
- dispatch(action, argument);
- show_sc = tmp_sc;
-
- //return 0;
+ else
+ verboseDispatch(action, false);
}
FuncStatus LyXFunc::getStatus(int ac) const
{
- return getStatus(ac, string());
+ kb_action action;
+ string argument;
+ action = lyxaction.retrieveActionArg(ac, argument);
+ return getStatus(action, argument);
}
-FuncStatus LyXFunc::getStatus(int ac,
- string const & not_to_use_arg) const
+
+FuncStatus LyXFunc::getStatus(kb_action action,
+ string const & argument) const
{
- kb_action action;
FuncStatus flag;
- string argument;
Buffer * buf = owner->buffer();
- if (lyxaction.isPseudoAction(ac))
- action = lyxaction.retrieveActionArg(ac, argument);
- else {
- action = static_cast<kb_action>(ac);
- if (!not_to_use_arg.empty())
- argument = not_to_use_arg; // except here
- }
-
if (action == LFUN_UNKNOWN_ACTION) {
setErrorMessage(N_("Unknown action"));
return flag.unknown(true);
disable = true;
if (owner->view()->theLockingInset()) {
FuncStatus ret;
- ret.disabled(true);
+ //ret.disabled(true);
if (owner->view()->theLockingInset()->lyxCode() == Inset::TABULAR_CODE) {
ret = static_cast<InsetTabular *>
(owner->view()->theLockingInset())->
string s2(frontStrip(strip(s)));
if (!s2.empty()) {
- dispatch(s2);
+ verboseDispatch(s2, true);
}
}
-string const LyXFunc::dispatch(string const & s)
+void const LyXFunc::verboseDispatch(string const & s, bool show_sc)
{
// Split command string into command and argument
string cmd;
string const msg = string(_("Unknown function ("))
+ cmd + ")";
owner->message(msg);
- return string();
} else {
- return dispatch(action, arg);
+ verboseDispatch(action, show_sc);
}
}
-string const LyXFunc::dispatch(int ac,
- string const & do_not_use_this_arg)
+void const LyXFunc::verboseDispatch(int ac, bool show_sc)
{
- lyxerr[Debug::ACTION] << "LyXFunc::Dispatch: action[" << ac
- <<"] arg[" << do_not_use_this_arg << "]" << endl;
-
string argument;
kb_action action;
- // we have not done anything wrong yet.
- errorstat = false;
- dispatch_buffer.erase();
+ // get the real action and argument
+ action = lyxaction.retrieveActionArg(ac, argument);
+
+ verboseDispatch(action, argument, show_sc);
+}
+
+
+
+void const LyXFunc::verboseDispatch(kb_action action,
+ string const & argument, bool show_sc)
+{
+ string res = dispatch(action, argument);
+
+ commandshortcut.erase();
- // if action is a pseudo-action, we need the real action
- if (lyxaction.isPseudoAction(ac)) {
- string tmparg;
- action = static_cast<kb_action>
- (lyxaction.retrieveActionArg(ac, tmparg));
- if (!tmparg.empty())
- argument = tmparg;
+ if (lyxrc.display_shortcuts && show_sc) {
+ if (action != LFUN_SELFINSERT) {
+ // Put name of command and list of shortcuts
+ // for it in minibuffer
+ string comname = lyxaction.getActionName(action);
+
+ int pseudoaction = action;
+ bool argsadded = false;
+
+ if (!argument.empty()) {
+ // the pseudoaction is useful for the bindings
+ pseudoaction =
+ lyxaction.searchActionArg(action,
+ argument);
+
+ if (pseudoaction == LFUN_UNKNOWN_ACTION) {
+ pseudoaction = action;
+ } else {
+ comname += " " + argument;
+ argsadded = true;
+ }
+ }
+
+ string const shortcuts =
+ toplevel_keymap->findbinding(pseudoaction);
+
+ if (!shortcuts.empty()) {
+ comname += ": " + shortcuts;
+ } else if (!argsadded && !argument.empty()) {
+ comname += " " + argument;
+ }
+
+ if (!comname.empty()) {
+ comname = strip(comname);
+ commandshortcut = "(" + comname + ')';
+ }
+ }
+ }
+
+ if (res.empty()) {
+ if (!commandshortcut.empty()) {
+ owner->getMiniBuffer()->addSet(commandshortcut);
+ }
} else {
- action = static_cast<kb_action>(ac);
- if (!do_not_use_this_arg.empty())
- argument = do_not_use_this_arg; // except here
+ owner->getMiniBuffer()->addSet(' ' + commandshortcut);
}
+}
+
+
+string const LyXFunc::dispatch(kb_action action, string argument)
+{
+ lyxerr[Debug::ACTION] << "LyXFunc::Dispatch: action[" << action
+ <<"] arg[" << argument << "]" << endl;
+
+ // we have not done anything wrong yet.
+ errorstat = false;
+ dispatch_buffer.erase();
-
#ifdef NEW_DISPATCHER
// We try do call the most specific dispatcher first:
// 1. the lockinginset's dispatch
// 2. the bufferview's dispatch
// 3. the lyxview's dispatch
#endif
-
+
selection_possible = false;
-
+
if (owner->view()->available())
owner->view()->hideCursor();
// We cannot use this function here
- if (getStatus(ac, do_not_use_this_arg).disabled()) {
+ if (getStatus(action, argument).disabled()) {
lyxerr[Debug::ACTION] << "LyXFunc::Dispatch: "
- << lyxaction.getActionName(ac)
- << " [" << ac << "] is disabled at this location"
+ << lyxaction.getActionName(action)
+ << " [" << action << "] is disabled at this location"
<< endl;
goto exit_with_message;
}
if ((action > 1) || ((action == LFUN_UNKNOWN_ACTION) &&
(!keyseq.deleted())))
{
- if ((action==LFUN_UNKNOWN_ACTION) && argument.empty()){
+ if ((action == LFUN_UNKNOWN_ACTION)
+ && argument.empty()){
argument = keyseq.getiso();
}
// Undo/Redo is a bit tricky for insets.
while (argument.find(';') != string::npos) {
string first;
argument = split(argument, first, ';');
- dispatch(first);
+ verboseDispatch(first, false);
}
}
break;
exit_with_message:
- commandshortcut.erase();
-
- if (lyxrc.display_shortcuts && show_sc) {
- if (action != LFUN_SELFINSERT) {
- // Put name of command and list of shortcuts
- // for it in minibuffer
- string comname = lyxaction.getActionName(action);
-
- kb_action pseudoaction = action;
- bool argsadded = false;
-
- if (!argument.empty()) {
- // If we have the command with argument,
- // this is better
- pseudoaction =
- lyxaction.searchActionArg(action,
- argument);
-
- if (pseudoaction == -1) {
- pseudoaction = action;
- } else {
- comname += " " + argument;
- argsadded = true;
- }
- }
-
- string const shortcuts =
- toplevel_keymap->findbinding(pseudoaction);
-
- if (!shortcuts.empty()) {
- comname += ": " + shortcuts;
- } else if (!argsadded && !argument.empty()) {
- comname += " " + argument;
- }
-
- if (!comname.empty()) {
- comname = strip(comname);
- commandshortcut = "(" + comname + ')';
-
- // Here we could even add a small pause,
- // to annoy the user and make him learn
- // the shortcuts.
- // No! That will just annoy, not teach
- // anything. The user will read the messages
- // if they are interested. (Asger)
- }
- }
- }
-
string const res = getMessage();
- if (res.empty()) {
- if (!commandshortcut.empty()) {
- owner->getMiniBuffer()->addSet(commandshortcut);
- }
- } else {
- string const msg(_(res) + ' ' + commandshortcut);
- owner->message(msg);
- }
+ if (!res.empty())
+ owner->message(_(res));
return res;
}
LyXFunc(LyXView *);
/// LyX dispatcher, executes lyx actions.
- string const dispatch(int action, string const & arg = string());
-
- /// The same but uses the name of a lyx command.
- string const dispatch(string const & cmd);
+ string const dispatch(kb_action ac, string argument = string());
- ///
- void miniDispatch(string const & cmd);
+ /// The same as dispatch, but also shows shortcuts and command
+ /// name in minibuffer if show_sc is true (more to come?)
+ void const LyXFunc::verboseDispatch(kb_action action,
+ string const & argument,
+ bool show_sc);
+
+ /// Same as above, using a pseudoaction as argument
+ void const LyXFunc::verboseDispatch(int ac, bool show_sc);
+
+ /// Same as above, when the command is provided as a string
+ void const LyXFunc::verboseDispatch(string const & s, bool show_sc);
+
+ ///
+ void LyXFunc::miniDispatch(string const & s);
///
void initMiniBuffer();
///
void processKeySym(KeySym k, unsigned int state);
- /// we need one internall which is called from inside LyXAction and
+ /// we need one internal which is called from inside LyXAction and
/// can contain the string argument.
FuncStatus getStatus(int ac) const;
///
- FuncStatus getStatus(int ac,
- string const & not_to_use_arg) const;
+ FuncStatus getStatus(kb_action action,
+ string const & argument = string()) const;
/// The last key was meta
bool wasMetaKey() const;
string const getMessage() const { return dispatch_buffer; }
/// Handle a accented char keysequenze
void handleKeyFunc(kb_action action);
- /// Should a hint message be displayed?
- void setHintMessage(bool);
+
private:
///
LyXView * owner;
///
LyXText * TEXT(bool) const;
///
- // This is the same for all lyxfunc objects
- static bool show_sc;
};
}
-inline
-void LyXFunc::setHintMessage(bool hm)
-{
- show_sc = hm;
-}
-
#endif
// connect to the lyxfunc in the single LyXView we
// support currently. (Lgb)
- int action = lyxaction.LookupFunc(cmd);
+ kb_action action = static_cast<kb_action>(lyxaction.LookupFunc(cmd));
//int action = -1;
string rval, buf;
+2002-01-10 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * math_support.C: change latex_mathfontcmds to an array of
+ kb_action.
+
2002-01-11 Angus Leeming <a.leeming@ic.ac.uk>
* math_exfuncinset.C: remove using std::ostream declaration.
#include "math_parser.h"
#include "Painter.h"
#include "debug.h"
+#include "commandtags.h"
using std::map;
using std::endl;
"textstyle", "displaystyle", "scriptstyle", "scriptscriptstyle"
};
-char const * latex_mathfontcmds[] = {
- "font-bold", "font-emph", "font-roman", "font-code", "font-sans",
- "font-ital", "font-noun", "font-frak", "font-free", "font-default"
+kb_action latex_mathfontcmds[] = {
+ LFUN_BOLD, LFUN_EMPH, LFUN_ROMAN, LFUN_CODE, LFUN_SANS,
+ LFUN_ITAL, LFUN_NOUN, LFUN_FRAK, LFUN_FREE, LFUN_DEFAULT
};
cmd += OnlyFilename(owner_->fileName());
cmd += "\"";
doVCCommand(cmd, owner_->filepath);
- owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+ owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
}
{
doVCCommand("ci -q -u -m\"" + msg + "\" \""
+ OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
- owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+ owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
}
owner_->markLyxClean();
doVCCommand("co -q -l \""
+ OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
- owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+ owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
}
// We ignore changes and just reload!
owner_->markLyxClean();
owner_->getUser()->owner()
- ->getLyXFunc()->dispatch("buffer-reload");
+ ->getLyXFunc()->dispatch(LFUN_MENURELOAD);
}
{
doVCCommand("cvs -q add -m \"" + msg + "\" \""
+ OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
- owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+ owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
}
doVCCommand("cvs -q commit -m \"" + msg + "\" \""
+ OnlyFilename(owner_->fileName()) + "\"",
owner_->filepath);
- owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+ owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
}
owner_->filepath);
owner_->markLyxClean();
owner_->getUser()->owner()
- ->getLyXFunc()->dispatch("buffer-reload");
+ ->getLyXFunc()->dispatch(LFUN_MENURELOAD);
}