Improve display of index names under Insert>Lists/TOC.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36006 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-11-02 20:38:42 +00:00
parent cddf32f152
commit dc5934737d

View File

@ -1358,16 +1358,16 @@ void MenuDefinition::expandIndices(Buffer const * buf, bool listof)
IndicesList::const_iterator end = params.indiceslist().end();
for (int ii = 1; cit != end; ++cit, ++ii) {
if (listof)
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(cit->index()),
FuncRequest(LFUN_INDEX_PRINT,
cit->shortcut())));
else {
docstring label = _("Index Entry");
label += " (" + cit->index() + ")";
if (listof) {
docstring const label =
bformat(_("Index: %1$s"), cit->index());
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),
FuncRequest(LFUN_INDEX_INSERT,
cit->shortcut())));
FuncRequest(LFUN_INDEX_PRINT, cit->shortcut())));
} else {
docstring const label =
bformat(_("Index Entry (%1$s)"), cit->index());
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),
FuncRequest(LFUN_INDEX_INSERT, cit->shortcut())));
}
}
}