From 1a6e951b4f876307548f05c36236461d2104d87d Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Thu, 8 Mar 2012 16:43:04 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiDocument.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index bf2dd953fe..d71c6b5a95 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -261,6 +261,15 @@ vector 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 pkglist = getPackageList(modName); docstring pkgdesc = formatStrVec(pkglist, _("and")); if (!pkgdesc.empty()) { -- 2.39.2