]> git.lyx.org Git - lyx.git/blobdiff - src/MenuBackend.C
Scons: update_po target, part one: language_l10n.pot
[lyx.git] / src / MenuBackend.C
index beaaa0cf711249e73ba6d2381f0c07b54d9e8f87..50384a0f94ca83c7af888fc1f077cb4e0f595a78 100644 (file)
 
 namespace lyx {
 
-using support::compare_no_case;
 using support::compare_ascii_no_case;
 using support::contains;
 using support::makeDisplayPath;
 using support::token;
-using support::uppercase;
 
 using boost::bind;
 
@@ -134,7 +132,7 @@ docstring const MenuItem::shortcut() const
 }
 
 
-docstring const MenuItem::binding() const
+docstring const MenuItem::binding(bool forgui) const
 {
        if (kind_ != Command)
                return docstring();
@@ -144,7 +142,7 @@ docstring const MenuItem::binding() const
        kb_keymap::Bindings bindings = theTopLevelKeymap().findbindings(func_);
 
        if (bindings.size()) {
-               return bindings.begin()->print();
+               return bindings.begin()->print(forgui);
        } else {
                lyxerr[Debug::KBMAP]
                        << "No binding for "
@@ -401,7 +399,7 @@ void Menu::checkShortcuts() const
                               << "\" does not contain shortcut `"
                               << to_utf8(shortcut) << "'." << endl;
                for (const_iterator it2 = begin(); it2 != it1 ; ++it2) {
-                       if (!compare_no_case(it2->shortcut(), shortcut)) {
+                       if (!compare_ascii_no_case(it2->shortcut(), shortcut)) {
                                lyxerr << "Menu warning: menu entries "
                                       << '"' << to_utf8(it1->fulllabel())
                                       << "\" and \"" << to_utf8(it2->fulllabel())
@@ -413,10 +411,9 @@ void Menu::checkShortcuts() const
 }
 
 
-void MenuBackend::specialMenu(docstring const &name)
+void MenuBackend::specialMenu(Menu const & menu)
 {
-       if (hasMenu(name))
-               specialmenu_ = &getMenu(name);
+       specialmenu_ = menu;
 }
 
 
@@ -537,10 +534,12 @@ void expandFormats(MenuItem::Kind kind, Menu & tomenu, Buffer const * buf)
 
                switch (kind) {
                case MenuItem::ImportFormats:
+                       // FIXME: This is a hack, we should rather solve
+                       // FIXME: bug 2488 instead.
                        if ((*fit)->name() == "text")
-                               label = _("Plain Text as Lines");
+                               label = _("Plain Text");
                        else if ((*fit)->name() == "textparagraph")
-                               label = _("Plain Text as Paragraphs");
+                               label = _("Plain Text, Join Lines");
                        label += "...";
                        break;
                case MenuItem::ViewFormats:
@@ -890,8 +889,7 @@ void MenuBackend::expand(Menu const & frommenu, Menu & tomenu,
                        break;
 
                case MenuItem::Command:
-                       if (!specialmenu_
-                           || !specialmenu_->hasFunc(cit->func()))
+                       if (!specialmenu_.hasFunc(cit->func()))
                                tomenu.addWithStatusCheck(*cit);
                }
        }