]> git.lyx.org Git - lyx.git/blobdiff - src/vc-backend.C
bug 183
[lyx.git] / src / vc-backend.C
index 2a9d69c559cb8e02884820fd5e83accbbed55cda..794c81fc4aec00630a3f1f1b519e73547c2d532e 100644 (file)
@@ -4,20 +4,21 @@
 #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;
@@ -149,7 +150,7 @@ void RCS::registrer(string const & msg)
        cmd += OnlyFilename(owner_->fileName());
        cmd += "\"";
        doVCCommand(cmd, owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+       owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
@@ -157,7 +158,7 @@ void RCS::checkIn(string const & msg)
 {
        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);
 }
 
 
@@ -166,7 +167,7 @@ void RCS::checkOut()
        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);
 }
 
 
@@ -177,7 +178,7 @@ void RCS::revert()
        // We ignore changes and just reload!
        owner_->markLyxClean();
        owner_->getUser()->owner()
-               ->getLyXFunc()->dispatch("buffer-reload");
+               ->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
@@ -253,6 +254,7 @@ void CVS::scanMaster()
                        //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]
@@ -278,7 +280,7 @@ void CVS::registrer(string const & msg)
 {
        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);
 }
 
 
@@ -287,7 +289,7 @@ void CVS::checkIn(string const & msg)
        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);
 }
 
 
@@ -308,7 +310,7 @@ void CVS::revert()
                    owner_->filepath);
        owner_->markLyxClean();
        owner_->getUser()->owner()
-               ->getLyXFunc()->dispatch("buffer-reload");
+               ->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }