mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
Adapt inset info to new version check
This commit is contained in:
parent
2e6ea5f613
commit
9966b4be4a
@ -1,5 +1,5 @@
|
||||
#LyX 2.4 created this file. For more info see https://www.lyx.org/
|
||||
\lyxformat 612
|
||||
\lyxformat 613
|
||||
\begin_document
|
||||
\begin_header
|
||||
\save_transient_properties true
|
||||
@ -5845,7 +5845,7 @@ babel
|
||||
|
||||
\begin_inset Info
|
||||
type "package"
|
||||
arg "babel-2017/11/03"
|
||||
arg "babel 20171103"
|
||||
\end_inset
|
||||
|
||||
),
|
||||
|
@ -986,7 +986,19 @@ void InsetInfo::build()
|
||||
if (initialized_)
|
||||
break;
|
||||
// check in packages.lst
|
||||
if (LaTeXFeatures::isAvailable(params_.name)) {
|
||||
bool available;
|
||||
// we also allow version check with version separated by blank
|
||||
if (contains(params_.name, ' ')) {
|
||||
string name;
|
||||
string const version = split(params_.name, name, ' ');
|
||||
int const y = convert<int>(version.substr(0,4));
|
||||
int const m = convert<int>(version.substr(4,2));
|
||||
int const d = convert<int>(version.substr(6,2));
|
||||
available = LaTeXFeatures::isAvailableAtLeastFrom(name, y, m, d);
|
||||
} else
|
||||
available = LaTeXFeatures::isAvailable(params_.name);
|
||||
|
||||
if (available) {
|
||||
gui = _("yes");
|
||||
info(from_ascii("yes"), params_.lang);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user