]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
LogUi.ui: string redundancy.
[lyx.git] / src / LyXVC.cpp
index 770706c3e5eca8aa816b75c725eccdb943edd9d0..a8455546642642b632bd8bc0a1319f1837e08fbc 100644 (file)
@@ -3,11 +3,11 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
  * \author Jean-Marc Lasgouttes
  * \author Angus Leeming
  * \author John Levon
- * \author André Pönitz
+ * \author André Pönitz
  * \author Allan Rae
  *
  * Full author contact details are available in file CREDITS.
@@ -91,7 +91,7 @@ void LyXVC::setBuffer(Buffer * buf)
 }
 
 
-void LyXVC::registrer()
+bool LyXVC::registrer()
 {
        FileName const filename = owner_->fileName();
 
@@ -100,7 +100,7 @@ void LyXVC::registrer()
                Alert::error(_("Document not saved"),
                             _("You must save the document "
                                            "before it can be registered."));
-               return;
+               return false;
        }
 
        // it is very likely here that the vcs is not created yet...
@@ -134,11 +134,12 @@ void LyXVC::registrer()
                        _("(no initial description)"));
        if (!ok) {
                LYXERR(Debug::LYXVC, "LyXVC: user cancelled");
-               return;
+               return false;
        }
        if (response.empty())
                response = _("(no initial description)");
        vcs->registrer(to_utf8(response));
+       return true;
 }
 
 
@@ -169,6 +170,13 @@ string LyXVC::checkOut()
 }
 
 
+string LyXVC::lockingToggle()
+{
+       LYXERR(Debug::LYXVC, "LyXVC: toggle locking property");
+       return vcs->lockingToggle();
+}
+
+
 void LyXVC::revert()
 {
        LYXERR(Debug::LYXVC, "LyXVC: revert");
@@ -205,6 +213,8 @@ void LyXVC::toggleReadOnly()
                LYXERR(Debug::LYXVC, "LyXVC: toggle to unlocked");
                checkIn();
                break;
+       case VCS::NOLOCKING:
+               break;
        }
 }
 
@@ -263,6 +273,12 @@ bool LyXVC::checkInEnabled()
 }
 
 
+bool LyXVC::lockingToggleEnabled()
+{
+       return vcs && vcs->lockingToggleEnabled();
+}
+
+
 bool LyXVC::undoLastEnabled()
 {
        return vcs && vcs->undoLastEnabled();