mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
parent
760b7cf2b6
commit
4ed8caaf1c
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include "BufferParams.h"
|
#include "BufferParams.h"
|
||||||
#include "FloatList.h"
|
#include "FloatList.h"
|
||||||
|
#include "IndicesList.h"
|
||||||
#include "Language.h"
|
#include "Language.h"
|
||||||
#include "Length.h"
|
#include "Length.h"
|
||||||
#include "TextClass.h"
|
#include "TextClass.h"
|
||||||
@ -618,6 +619,15 @@ QString guiName(string const & type, BufferParams const & bp)
|
|||||||
return qt_("Branches");
|
return qt_("Branches");
|
||||||
if (type == "change")
|
if (type == "change")
|
||||||
return qt_("Changes");
|
return qt_("Changes");
|
||||||
|
if (prefixIs(type, "index:")) {
|
||||||
|
string const itype = split(type, ':');
|
||||||
|
IndicesList const & indiceslist = bp.indiceslist();
|
||||||
|
Index const * index = indiceslist.findShortcut(from_utf8(itype));
|
||||||
|
docstring indextype = _("unknown type!");
|
||||||
|
if (index)
|
||||||
|
indextype = index->index();
|
||||||
|
return toqstr(bformat(_("Index Entries (%1$s)"), indextype));
|
||||||
|
}
|
||||||
|
|
||||||
FloatList const & floats = bp.documentClass().floats();
|
FloatList const & floats = bp.documentClass().floats();
|
||||||
if (floats.typeExist(type))
|
if (floats.typeExist(type))
|
||||||
|
@ -353,8 +353,11 @@ void InsetIndex::addToToc(DocIterator const & cpit, bool output_active) const
|
|||||||
DocIterator pit = cpit;
|
DocIterator pit = cpit;
|
||||||
pit.push_back(CursorSlice(const_cast<InsetIndex &>(*this)));
|
pit.push_back(CursorSlice(const_cast<InsetIndex &>(*this)));
|
||||||
docstring str;
|
docstring str;
|
||||||
|
string type = "index";
|
||||||
|
if (buffer().masterBuffer()->params().use_indices)
|
||||||
|
type += ":" + to_utf8(params_.index);
|
||||||
text().forOutliner(str, 0);
|
text().forOutliner(str, 0);
|
||||||
buffer().tocBackend().toc("index").push_back(TocItem(pit, 0, str, output_active));
|
buffer().tocBackend().toc(type).push_back(TocItem(pit, 0, str, output_active));
|
||||||
// Proceed with the rest of the inset.
|
// Proceed with the rest of the inset.
|
||||||
InsetCollapsable::addToToc(cpit, output_active);
|
InsetCollapsable::addToToc(cpit, output_active);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user