mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 10:58:52 +00:00
InsetInfo: tidy up error messages, fix an obvious bug in menus.cpp that breaks "info-insert menu name"
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24327 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
491f30920e
commit
b56a40d7eb
@ -202,7 +202,7 @@ public:
|
||||
/// set the description of the submenu
|
||||
void submenuname(QString const & name) { submenuname_ = name; }
|
||||
///
|
||||
bool hasSubmenu() const { return submenu_.isEmpty(); }
|
||||
bool hasSubmenu() const { return !submenu_.isEmpty(); }
|
||||
///
|
||||
MenuDefinition const & submenu() const { return submenu_.at(0); }
|
||||
MenuDefinition & submenu() { return submenu_[0]; }
|
||||
|
@ -208,12 +208,13 @@ void InsetInfo::updateInfo()
|
||||
vector<docstring> names;
|
||||
FuncRequest func = lyxaction.lookupFunc(name_);
|
||||
if (func.action == LFUN_UNKNOWN_ACTION) {
|
||||
setText(_("No menu entry for "), bp.getFont(), false);
|
||||
setText(bformat(_("Unknown action %1$s"), from_utf8(name_)), bp.getFont(), false);
|
||||
break;
|
||||
}
|
||||
// iterate through the menubackend to find it
|
||||
if (!theApp()->searchMenu(func, names)) {
|
||||
setText(_("No menu entry for "), bp.getFont(), false);
|
||||
setText(bformat(_("No menu entry for action %1$s"), from_utf8(name_)),
|
||||
bp.getFont(), false);
|
||||
break;
|
||||
}
|
||||
// if find, return its path.
|
||||
|
Loading…
Reference in New Issue
Block a user