]> git.lyx.org Git - lyx.git/commitdiff
Display the module category in the list of modules.
authorJulien Rioux <jrioux@lyx.org>
Thu, 8 Mar 2012 16:43:04 +0000 (16:43 +0000)
committerJulien Rioux <jrioux@lyx.org>
Thu, 8 Mar 2012 16:43:04 +0000 (16:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40887 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiDocument.cpp

index bf2dd953fe81b609c62c1d28617a624d4e4cb2be..d71c6b5a95b9cf7b74b64cb9dc739a334330c321 100644 (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()) {