]> git.lyx.org Git - lyx.git/blobdiff - src/vc-backend.C
Michael's latest batch of new gnome files.
[lyx.git] / src / vc-backend.C
index a5fd7be2a5d532e9a14eb96f6614ae1f4a32a7bc..c2d022344eb29f5ea48665ab146d1c54c01a7f28 100644 (file)
@@ -149,16 +149,16 @@ void RCS::registrer(string const & msg)
        cmd += "\" \"";
        cmd += OnlyFilename(owner_->fileName());
        cmd += "\"";
-       doVCCommand(cmd, owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+       doVCCommand(cmd, owner_->filePath());
+       owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
 void RCS::checkIn(string const & msg)
 {
        doVCCommand("ci -q -u -m\"" + msg + "\" \""
-                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filePath());
+       owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
@@ -166,19 +166,19 @@ void RCS::checkOut()
 {
        owner_->markLyxClean();
        doVCCommand("co -q -l \""
-                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filePath());
+       owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
 void RCS::revert()
 {
        doVCCommand("co -f -u" + version() + " \""
-                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
+                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filePath());
        // We ignore changes and just reload!
        owner_->markLyxClean();
        owner_->getUser()->owner()
-               ->getLyXFunc()->dispatch("buffer-reload");
+               ->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
@@ -187,14 +187,14 @@ void RCS::undoLast()
        lyxerr[Debug::LYXVC] << "LyXVC: undoLast" << endl;
        doVCCommand("rcs -o" + version() + " \""
                    + OnlyFilename(owner_->fileName()) + "\"",
-                   owner_->filepath);
+                   owner_->filePath());
 }
 
 
 void RCS::getLog(string const & tmpf)
 {
        doVCCommand("rlog \""
-                   + OnlyFilename(owner_->fileName()) + "\" > " + tmpf, owner_->filepath);
+                   + OnlyFilename(owner_->fileName()) + "\" > " + tmpf, owner_->filePath());
 }
 
 
@@ -254,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,8 +279,8 @@ void CVS::scanMaster()
 void CVS::registrer(string const & msg)
 {
        doVCCommand("cvs -q add -m \"" + msg + "\" \""
-                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filepath);
-       owner_->getUser()->owner()->getLyXFunc()->dispatch("buffer-reload");
+                   + OnlyFilename(owner_->fileName()) + "\"", owner_->filePath());
+       owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
@@ -287,8 +288,8 @@ 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_->filePath());
+       owner_->getUser()->owner()->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
@@ -306,10 +307,10 @@ void CVS::revert()
        string const fil = OnlyFilename(owner_->fileName());
        
        doVCCommand("rm -f \"" + fil + "\"; cvs update \"" + fil + "\"",
-                   owner_->filepath);
+                   owner_->filePath());
        owner_->markLyxClean();
        owner_->getUser()->owner()
-               ->getLyXFunc()->dispatch("buffer-reload");
+               ->getLyXFunc()->dispatch(LFUN_MENURELOAD);
 }
 
 
@@ -326,5 +327,5 @@ void CVS::getLog(string const & tmpf)
 {
        doVCCommand("cvs log \""
                    + OnlyFilename(owner_->fileName()) + "\" > " + tmpf,
-                   owner_->filepath);
+                   owner_->filePath());
 }