Display the module category in the list of modules.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40887 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Julien Rioux 2012-03-08 16:43:04 +00:00
parent 488b9ae3a2
commit 1a6e951b4f

View File

@ -261,6 +261,15 @@ vector<string> getExcludedList(string const & modName)
}
docstring getModuleCategory(string const & modName)
{
LyXModule const * const mod = theModuleList[modName];
if (!mod)
return docstring();
return from_utf8(mod->category());
}
docstring getModuleDescription(string const & modName)
{
LyXModule const * const mod = theModuleList[modName];
@ -2221,6 +2230,13 @@ void GuiDocument::updateModuleInfo()
desc += _("Module provided by document class.");
}
docstring cat = getModuleCategory(modName);
if (!cat.empty()) {
if (!desc.empty())
desc += "\n";
desc += bformat(_("Category: %1$s."), cat);
}
vector<string> pkglist = getPackageList(modName);
docstring pkgdesc = formatStrVec(pkglist, _("and"));
if (!pkgdesc.empty()) {