X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyXVC.cpp;h=b28139fb61c08d124220acde13dd986f42c324f7;hb=ae676958d922068ff5890f29d7cf983c7ae00b6a;hp=4dbcfd2675f5041bda2285e6950f266cc2fee87a;hpb=f09a9fe2e60e4aeaca23b42b2bf30f5d64cfd9b1;p=lyx.git diff --git a/src/LyXVC.cpp b/src/LyXVC.cpp index 4dbcfd2675..b28139fb61 100644 --- a/src/LyXVC.cpp +++ b/src/LyXVC.cpp @@ -41,11 +41,6 @@ LyXVC::LyXVC() } -// for the sake of boost::scoped_ptr -LyXVC::~LyXVC() -{} - - bool LyXVC::fileInVC(FileName const & fn) { if (!RCS::findFile(fn).empty()) @@ -328,7 +323,13 @@ string LyXVC::toggleReadOnly() return log; } case VCS::NOLOCKING: - break; + Buffer * b = vcs->owner(); + bool const newstate = !b->isReadonly(); + string result = "LyXVC: toggle to "; + result += (newstate ? "readonly" : "readwrite"); + LYXERR(Debug::LYXVC, result); + b->setReadonly(newstate); + return result; } return string(); }