]> git.lyx.org Git - lyx.git/blobdiff - src/lyxvc.C
Collapse all those LFUN_XYZ_APPLY to a single LFUN_INSET_APPLY.
[lyx.git] / src / lyxvc.C
index 92670f2a17d8a547bf436eff77847fe8cf86178d..629e6daebf117943803b158fb3af723fe0efd31d 100644 (file)
@@ -1,16 +1,12 @@
 #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"
@@ -76,7 +72,7 @@ void LyXVC::buffer(Buffer * buf)
 void LyXVC::registrer()
 {
        string const filename = owner_->fileName();
+
        // there must be a file to save
        if (!IsFileReadable(filename)) {
                Alert::alert(_("File not saved"),
@@ -113,14 +109,13 @@ void LyXVC::registrer()
                        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 =
@@ -146,14 +141,13 @@ void LyXVC::checkIn()
                        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"));