X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXVC.cpp;h=cb2c5488f210b66fe3c7ce0cf71d3bc88c13efdb;hb=19b840ae23a888300f9a5c03971351b546cce93d;hp=15d2626ce7567846aae5c95d218a1ac30833d6af;hpb=82808fea04315fd323ec074e8ad7865d190987d4;p=lyx.git diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index 15d2626ce7..cb2c5488f2 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -41,9 +41,14 @@ LyXVC::LyXVC() } -string LyXVC::vcname() const +docstring LyXVC::vcstatus() const { - return vcs->vcname(); + if (!vcs) + return docstring(); + if (locking()) + return bformat(_("%1$s lock"), from_ascii(vcs->vcname())); + else + return from_ascii(vcs->vcname()); } @@ -257,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"); @@ -330,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); @@ -442,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);