]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
comment
[lyx.git] / src / LyXVC.cpp
index 62f41cc2042dcd8d6f9250fd58236b09de3d92ea..e156396fe2cba1c1cf7c86082dfe7e5fd5bee941 100644 (file)
 
 #include "LyXVC.h"
 #include "VCBackend.h"
-#include "support/debug.h"
 #include "Buffer.h"
-#include "support/gettext.h"
 
 #include "frontends/alert.h"
 
+#include "support/debug.h"
 #include "support/filetools.h"
+#include "support/gettext.h"
 #include "support/lstrings.h"
 
 using namespace std;
@@ -96,7 +96,8 @@ void LyXVC::registrer()
 
        // it is very likely here that the vcs is not created yet...
        if (!vcs) {
-               FileName const cvs_entries(makeAbsPath("CVS/Entries"));
+               //check in the root directory of the document
+               FileName const cvs_entries(onlyPath(filename.absFilename()) + "/CVS/Entries");
 
                if (cvs_entries.isReadableFile()) {
                        LYXERR(Debug::LYXVC, "LyXVC: registering "
@@ -227,4 +228,22 @@ string const LyXVC::getLogFile() const
 }
 
 
+bool LyXVC::checkOutEnabled()
+{
+       return vcs && vcs->checkOutEnabled();
+}
+
+
+bool LyXVC::checkInEnabled()
+{
+       return vcs && vcs->checkInEnabled();
+}
+
+
+bool LyXVC::undoLastEnabled()
+{
+       return vcs && vcs->undoLastEnabled();
+}
+
+
 } // namespace lyx