#include <config.h>
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
#include "lyxvc.h"
#include "vc-backend.h"
#include "debug.h"
#include "buffer.h"
#include "BufferView.h"
-#include "lyxfunc.h"
#include "gettext.h"
+#include "funcrequest.h"
#include "frontends/Alert.h"
#include "frontends/LyXView.h"
void LyXVC::registrer()
{
string const filename = owner_->fileName();
-
+
// there must be a file to save
if (!IsFileReadable(filename)) {
Alert::alert(_("File not saved"),
MakeDisplayPath(filename, 50),
_("Save document and proceed?"))) {
vcs->owner()->getUser()->owner()
- ->getLyXFunc().dispatch(LFUN_MENUWRITE);
+ ->dispatch(FuncRequest(LFUN_MENUWRITE));
}
// Maybe the save fails, or we answered "no". In both cases,
// the document will be dirty, and we abort.
- if (!vcs->owner()->isClean()) {
+ if (!vcs->owner()->isClean())
return;
- }
lyxerr[Debug::LYXVC] << "LyXVC: registrer" << endl;
pair<bool, string> tmp =
MakeDisplayPath(vcs->owner()->fileName(), 50),
_("Save document and proceed?"))) {
vcs->owner()->getUser()->owner()
- ->getLyXFunc().dispatch(LFUN_MENUWRITE);
+ ->dispatch(FuncRequest(LFUN_MENUWRITE));
}
// Maybe the save fails, or we answered "no". In both cases,
// the document will be dirty, and we abort.
- if (!vcs->owner()->isClean()) {
+ if (!vcs->owner()->isClean())
return;
- }
lyxerr[Debug::LYXVC] << "LyXVC: checkIn" << endl;
pair<bool, string> tmp = Alert::askForText(_("LyX VC: Log Message"));