]> git.lyx.org Git - features.git/commitdiff
Spots from Abdel
authorPavel Sanda <sanda@lyx.org>
Fri, 12 Feb 2010 01:44:13 +0000 (01:44 +0000)
committerPavel Sanda <sanda@lyx.org>
Fri, 12 Feb 2010 01:44:13 +0000 (01:44 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33428 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyXAction.cpp
src/LyXVC.cpp
src/LyXVC.h
src/VCBackend.cpp
src/VCBackend.h
src/insets/InsetInfo.cpp

index 673a2308cff805bb80355c725cbe377bda847b1b..8cdc26803fa4c7b93ea953ba50ea103acba94e38 100644 (file)
@@ -415,7 +415,7 @@ void LyXAction::init()
                      textclass: name of textclass (e.g. article) \n
                      menu: name of lfun used in menu  \n
                      icon: name of lfun used in toolbar \n
-                     buffer: "name"|"path"|"class"
+                     buffer: "name"|"path"|"class"|"vcs-revision"
  * \li Sample: command-sequence info-insert buffer path; info-insert buffer name
  * \li Origin: bpeng, 7 Oct 2007
  * \endvar
index b33459a0dadd5aaa9ea7074eefd13bb2e75266f5..1c08863f1ebff00f03d16bc027e5c3187730417c 100644 (file)
@@ -287,7 +287,7 @@ string const LyXVC::getLogFile() const
 }
 
 
-std::string const LyXVC::revisionInfo(RevisionInfo const info)
+std::string LyXVC::revisionInfo(RevisionInfo const info)
 {
        if (!vcs)
                return string();
index f3e591fa03349a12091b7f2b09ac790cb2756056..6a4b3bd0a60bde6f80ec5f6f69e475e85a58b98a 100644 (file)
@@ -153,7 +153,7 @@ public:
         * Its safe to call it regardless VCS is in usage or this
         * info is (un)available. Returns empty string in such a case.
         */
-       std::string const revisionInfo(RevisionInfo const info);
+       std::string revisionInfo(RevisionInfo const info);
 
 private:
        ///
index 9a8dc7e39c4f7ff33b75d79781dcd4a8b03b55c2..908593b967edffedb8722d790972e47c8c8f84d4 100644 (file)
@@ -281,7 +281,7 @@ bool RCS::toggleReadOnlyEnabled()
 }
 
 // FIXME This could be implemented with cache from scanMaster
-string const RCS::revisionInfo(LyXVC::RevisionInfo const)
+string RCS::revisionInfo(LyXVC::RevisionInfo const)
 {
        return string();
 }
@@ -482,7 +482,7 @@ bool CVS::toggleReadOnlyEnabled()
 }
 
 
-string const CVS::revisionInfo(LyXVC::RevisionInfo const)
+string CVS::revisionInfo(LyXVC::RevisionInfo const)
 {
        return string();
 }
@@ -857,18 +857,18 @@ bool SVN::undoLastEnabled()
 }
 
 
-string const SVN::revisionInfo(LyXVC::RevisionInfo const info)
+string SVN::revisionInfo(LyXVC::RevisionInfo const info)
 {
        switch (info) {
                case LyXVC::File:
-                       if (_rev_file_cache.empty())
-                               _rev_file_cache = getFileRevisionInfo();
-                       if (_rev_file_cache.empty())
-                               _rev_file_cache = "?";
-                       if (_rev_file_cache == "?")
+                       if (rev_file_cache_.empty())
+                               rev_file_cache_ = getFileRevisionInfo();
+                       if (rev_file_cache_.empty())
+                               rev_file_cache_ = "?";
+                       if (rev_file_cache_ == "?")
                                return string();
 
-                       return _rev_file_cache;
+                       return rev_file_cache_;
        }
        return string();
 }
index c14ba177541583e9363cb8d3ebdd425c45d21cb4..43b2e1d2ea5484b9569e4655bb04bd989dbc32be 100644 (file)
@@ -80,7 +80,7 @@ public:
        /// (also used for check-out operation)
        virtual bool toggleReadOnlyEnabled() = 0;
        /// Return revision info specified by the argument.
-       virtual std::string const revisionInfo(LyXVC::RevisionInfo const info) = 0;
+       virtual std::string revisionInfo(LyXVC::RevisionInfo const info) = 0;
 protected:
        /// parse information from the version file
        virtual void scanMaster() = 0;
@@ -161,7 +161,7 @@ public:
 
        virtual bool toggleReadOnlyEnabled();
 
-       virtual std::string const revisionInfo(LyXVC::RevisionInfo const info);
+       virtual std::string revisionInfo(LyXVC::RevisionInfo const info);
 
 protected:
        virtual void scanMaster();
@@ -210,7 +210,7 @@ public:
 
        virtual bool toggleReadOnlyEnabled();
 
-       virtual std::string const revisionInfo(LyXVC::RevisionInfo const info);
+       virtual std::string revisionInfo(LyXVC::RevisionInfo const info);
 
 protected:
        virtual void scanMaster();
@@ -262,7 +262,7 @@ public:
 
        virtual bool toggleReadOnlyEnabled();
 
-       virtual std::string const revisionInfo(LyXVC::RevisionInfo const info);
+       virtual std::string revisionInfo(LyXVC::RevisionInfo const info);
 
 protected:
        virtual void scanMaster();
@@ -282,7 +282,7 @@ private:
        /// real code for obtaining file revision info
        std::string getFileRevisionInfo();
        /// cache for file revision number, "?" if already unsuccessful
-       std::string _rev_file_cache;
+       std::string rev_file_cache_;
 };
 
 } // namespace lyx
index 0df2fd59411f9cf6b4f4d81cc33cede5b95870e4..871a361d49e9da04e6158dfb81517e990fccfe8c 100644 (file)
@@ -175,7 +175,7 @@ bool InsetInfo::validateModifyArgument(docstring const & arg) const
                return true;
        case BUFFER_INFO:
                return name == "name" || name == "path" || name == "class" ||
-                      name == "file-revision";
+                      name == "vcs-revision";
        }
        return false;
 }
@@ -373,7 +373,7 @@ void InsetInfo::updateInfo()
                        setText(from_utf8(buffer().filePath()));
                else if (name_ == "class")
                        setText(from_utf8(bp.documentClass().name()));
-               else if (name_ == "file-revision" && buffer().lyxvc().inUse() &&
+               else if (name_ == "vcs-revision" && buffer().lyxvc().inUse() &&
                         !buffer().lyxvc().revisionInfo(LyXVC::File).empty())
                        setText(from_utf8(buffer().lyxvc().revisionInfo(LyXVC::File)));
                else