]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
Use \babelfonts only if babel >= 3.15 is available.
[lyx.git] / src / LyXVC.cpp
index d48031102b76436b578f667e76c9f6aa66e57f73..cb2c5488f210b66fe3c7ce0cf71d3bc88c13efdb 100644 (file)
@@ -41,9 +41,15 @@ LyXVC::LyXVC()
 }
 
 
-// for the sake of boost::scoped_ptr
-LyXVC::~LyXVC()
-{}
+docstring LyXVC::vcstatus() const
+{
+       if (!vcs)
+               return docstring();
+       if (locking())
+               return bformat(_("%1$s lock"), from_ascii(vcs->vcname()));
+       else
+               return from_ascii(vcs->vcname());
+}
 
 
 bool LyXVC::fileInVC(FileName const & fn)
@@ -256,7 +262,7 @@ string LyXVC::checkOut()
        if (!vcs)
                return string();
        //RCS allows checkOut only in ReadOnly mode
-       if (vcs->toggleReadOnlyEnabled() && !owner_->isReadonly())
+       if (vcs->toggleReadOnlyEnabled() && !owner_->hasReadonlyFlag())
                return string();
 
        LYXERR(Debug::LYXVC, "LyXVC: checkOut");
@@ -329,7 +335,7 @@ string LyXVC::toggleReadOnly()
        }
        case VCS::NOLOCKING:
                Buffer * b = vcs->owner();
-               bool const newstate = !b->isReadonly();
+               bool const newstate = !b->hasReadonlyFlag();
                string result = "LyXVC: toggle to ";
                result += (newstate ? "readonly" : "readwrite");
                LYXERR(Debug::LYXVC, result);
@@ -441,8 +447,8 @@ bool LyXVC::repoUpdateEnabled() const
 {
        return vcs && vcs->repoUpdateEnabled();
 }
-       
-       
+
+
 bool LyXVC::prepareFileRevision(string const & rev, std::string & f)
 {
        return vcs && vcs->prepareFileRevision(rev, f);