]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
GuiDocument: some polishing of the list of modules.
[lyx.git] / src / LyXVC.cpp
index 4dbcfd2675f5041bda2285e6950f266cc2fee87a..b28139fb61c08d124220acde13dd986f42c324f7 100644 (file)
@@ -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();
 }