#pragma implementation
#endif
-#include <fstream>
-
#include "vc-backend.h"
#include "debug.h"
+#include "buffer.h"
+#include "BufferView.h"
+#include "LyXView.h"
+#include "lyxfunc.h"
+
#include "support/FileInfo.h"
#include "support/LRegex.h"
#include "support/LSubstring.h"
#include "support/path.h"
#include "support/filetools.h"
#include "support/lstrings.h"
-#include "buffer.h"
-#include "BufferView.h"
-#include "LyXView.h"
-#include "lyxfunc.h"
+
+#include <fstream>
using std::endl;
using std::ifstream;
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);
}
//sm[4]; // options
//sm[5]; // tag or tagdate
FileInfo fi(file_);
+ // FIXME: must double check file is stattable/existing
time_t mod = fi.getModificationTime();
string mod_date = strip(asctime(gmtime(&mod)), '\n');
lyxerr[Debug::LYXVC]
{
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);
}