]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
ctests: samples for lib/unicodesymbols: only test export to 8-bit LaTeX.
[lyx.git] / src / LyXVC.cpp
index 4dbcfd2675f5041bda2285e6950f266cc2fee87a..15d2626ce7567846aae5c95d218a1ac30833d6af 100644 (file)
@@ -41,9 +41,10 @@ LyXVC::LyXVC()
 }
 
 
-// for the sake of boost::scoped_ptr
-LyXVC::~LyXVC()
-{}
+string LyXVC::vcname() const
+{
+       return vcs->vcname();
+}
 
 
 bool LyXVC::fileInVC(FileName const & fn)
@@ -328,7 +329,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();
 }