]> git.lyx.org Git - features.git/commitdiff
InsetInfo: tidy up error messages, fix an obvious bug in menus.cpp that breaks "info...
authorBo Peng <bpeng@lyx.org>
Fri, 18 Apr 2008 16:26:24 +0000 (16:26 +0000)
committerBo Peng <bpeng@lyx.org>
Fri, 18 Apr 2008 16:26:24 +0000 (16:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24327 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/Menus.cpp
src/insets/InsetInfo.cpp

index 74a43ebe2731eefbe04b68f43018932fb26b5256..d2d2fd57dc94f239c20dd0f31f4e4765732e7d57 100644 (file)
@@ -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]; }
index 442928b7c469bfa69e6a5097a7043564a01cf867..9a86168862a433e03ee9ca35383f6b92bcbdf145 100644 (file)
@@ -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.