Display index name in InsetIndex label

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20313 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Bo Peng 2007-09-16 14:08:16 +00:00
parent ce1c4adaa7
commit 18d587cb7e

View File

@ -34,7 +34,14 @@ InsetIndex::InsetIndex(InsetCommandParams const & p)
docstring const InsetIndex::getScreenLabel(Buffer const &) const
{
return _("Idx");
size_t const maxLabelChars = 25;
docstring label = "Idx:" + getParam("name");
if (label.size() > maxLabelChars) {
label.erase(maxLabelChars - 3);
label += "...";
}
return label;
}