* 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:
Jürgen Spitzmüller 2010-01-10 15:10:40 +00:00
parent e2925a160f
commit 8214670316
2 changed files with 18 additions and 1 deletions

View File

@ -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 temp;
@ -357,7 +369,10 @@ docstring InsetInclude::screenLabel() const
temp = buffer().B_("Verbatim Input*");
break;
case INCLUDE:
temp = buffer().B_("Include");
if (isChildIncluded())
temp = buffer().B_("Include");
else
temp += buffer().B_("Include (excluded)");
break;
case LISTINGS:
temp = listings_label_;

View File

@ -129,6 +129,8 @@ private:
docstring screenLabel() const;
/// holds the entity name that defines the file location (SGML)
docstring const include_label;
///
bool isChildIncluded() const;
/// The pointer never changes although *preview_'s contents may.
boost::scoped_ptr<RenderMonitoredPreview> const preview_;