mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Spots from Abdel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33428 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
da0bccb62c
commit
4c5ba07a7a
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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:
|
||||
///
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user