mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
* InsetInclude{.cpp, h}:
- indicate if a child document has been un-included (via the includeonly feature). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32941 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e2925a160f
commit
8214670316
@ -342,6 +342,18 @@ void InsetInclude::setParams(InsetCommandParams const & p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool InsetInclude::isChildIncluded() const
|
||||||
|
{
|
||||||
|
std::list<std::string> includeonlys =
|
||||||
|
buffer().params().getIncludedChildren();
|
||||||
|
if (includeonlys.empty())
|
||||||
|
return true;
|
||||||
|
return (std::find(includeonlys.begin(),
|
||||||
|
includeonlys.end(),
|
||||||
|
to_utf8(params()["filename"])) != includeonlys.end());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
docstring InsetInclude::screenLabel() const
|
docstring InsetInclude::screenLabel() const
|
||||||
{
|
{
|
||||||
docstring temp;
|
docstring temp;
|
||||||
@ -357,7 +369,10 @@ docstring InsetInclude::screenLabel() const
|
|||||||
temp = buffer().B_("Verbatim Input*");
|
temp = buffer().B_("Verbatim Input*");
|
||||||
break;
|
break;
|
||||||
case INCLUDE:
|
case INCLUDE:
|
||||||
temp = buffer().B_("Include");
|
if (isChildIncluded())
|
||||||
|
temp = buffer().B_("Include");
|
||||||
|
else
|
||||||
|
temp += buffer().B_("Include (excluded)");
|
||||||
break;
|
break;
|
||||||
case LISTINGS:
|
case LISTINGS:
|
||||||
temp = listings_label_;
|
temp = listings_label_;
|
||||||
|
@ -129,6 +129,8 @@ private:
|
|||||||
docstring screenLabel() const;
|
docstring screenLabel() const;
|
||||||
/// holds the entity name that defines the file location (SGML)
|
/// holds the entity name that defines the file location (SGML)
|
||||||
docstring const include_label;
|
docstring const include_label;
|
||||||
|
///
|
||||||
|
bool isChildIncluded() const;
|
||||||
|
|
||||||
/// The pointer never changes although *preview_'s contents may.
|
/// The pointer never changes although *preview_'s contents may.
|
||||||
boost::scoped_ptr<RenderMonitoredPreview> const preview_;
|
boost::scoped_ptr<RenderMonitoredPreview> const preview_;
|
||||||
|
Loading…
Reference in New Issue
Block a user