]> git.lyx.org Git - lyx.git/blobdiff - src/LyXVC.cpp
cosmetics
[lyx.git] / src / LyXVC.cpp
index cb82337f72776c420c75bc20479edf58ab28b373..af4505a14e875dbc8771ae7471137359508ad259 100644 (file)
@@ -31,9 +31,7 @@ namespace lyx {
 
 using support::bformat;
 using support::FileName;
-using support::isFileReadable;
 using support::makeAbsPath;
-using support::makeDisplayPath;
 using support::tempName;
 
 using std::endl;
@@ -85,7 +83,7 @@ bool LyXVC::file_not_found_hook(FileName const & fn)
 }
 
 
-void LyXVC::buffer(Buffer * buf)
+void LyXVC::setBuffer(Buffer * buf)
 {
        owner_ = buf;
 }
@@ -93,10 +91,10 @@ void LyXVC::buffer(Buffer * buf)
 
 void LyXVC::registrer()
 {
-       FileName const filename(owner_->fileName());
+       FileName const filename = owner_->fileName();
 
        // there must be a file to save
-       if (!isFileReadable(filename)) {
+       if (!filename.isFileReadable()) {
                Alert::error(_("Document not saved"),
                             _("You must save the document "
                                            "before it can be registered."));
@@ -107,17 +105,17 @@ void LyXVC::registrer()
        if (!vcs) {
                FileName const cvs_entries(makeAbsPath("CVS/Entries"));
 
-               if (isFileReadable(cvs_entries)) {
+               if (cvs_entries.isFileReadable()) {
                        LYXERR(Debug::LYXVC)
                                << "LyXVC: registering "
-                               << to_utf8(makeDisplayPath(filename.absFilename()))
+                               << to_utf8(filename.displayName())
                                << " with CVS" << endl;
                        vcs.reset(new CVS(cvs_entries, filename));
 
                } else {
                        LYXERR(Debug::LYXVC)
                                << "LyXVC: registering "
-                               << to_utf8(makeDisplayPath(filename.absFilename()))
+                               << to_utf8(filename.displayName())
                                << " with RCS" << endl;
                        vcs.reset(new RCS(filename));
                }
@@ -167,7 +165,7 @@ void LyXVC::revert()
 {
        LYXERR(Debug::LYXVC) << "LyXVC: revert" << endl;
 
-       docstring const file = makeDisplayPath(owner_->fileName(), 20);
+       docstring const file = owner_->fileName().displayName(20);
        docstring text = bformat(_("Reverting to the stored version of the "
                "document %1$s will lose all current changes.\n\n"
                                             "Do you want to revert to the saved version?"), file);
@@ -202,7 +200,8 @@ void LyXVC::toggleReadOnly()
 
 bool LyXVC::inUse()
 {
-       if (vcs) return true;
+       if (vcs)
+               return true;
        return false;
 }
 
@@ -212,6 +211,7 @@ bool LyXVC::inUse()
 //     return vcs->version();
 //}
 
+
 string const LyXVC::versionString() const
 {
        return vcs->versionString();