+ LayoutFileList const & list = LayoutFileList::get();
+ bool available = false;
+ if (list.haveClass(name_))
+ available = list[name_].isTeXClassAvailable();
+ setText(available ? _("yes") : _("no"));
+ break;
+ }
+ case MENU_INFO: {
+ docstring_list names;
+ FuncRequest const func = lyxaction.lookupFunc(name_);
+ if (func.action() == LFUN_UNKNOWN_ACTION) {
+ error("Unknown action %1$s");
+ break;
+ }
+ // iterate through the menubackend to find it
+ if (!theApp()->searchMenu(func, names)) {
+ error("No menu entry for action %1$s");
+ break;
+ }
+ // if found, return its path.
+ clear();
+ Paragraph & par = paragraphs().front();
+ Font const f(inherit_font, buffer().params().language);
+ //Font fu = f;
+ //fu.fontInfo().setUnderbar(FONT_ON);
+ docstring_list::const_iterator beg = names.begin();
+ docstring_list::const_iterator end = names.end();
+ for (docstring_list::const_iterator it = beg ;
+ it != end ; ++it) {
+ // do not insert > for the top level menu item
+ if (it != beg)
+ par.insertInset(par.size(), new InsetSpecialChar(InsetSpecialChar::MENU_SEPARATOR),
+ Change(Change::UNCHANGED));
+ //FIXME: add proper underlines here. This
+ // involves rewriting searchMenu used above to
+ // return a vector of menus. If we do not do
+ // that, we might as well use below
+ // Paragraph::insert on each string (JMarc)
+ for (size_type i = 0; i != it->length(); ++i)
+ par.insertChar(par.size(), (*it)[i],
+ f, Change(Change::UNCHANGED));
+ }