]> git.lyx.org Git - lyx.git/blobdiff - src/MenuBackend.C
* GuiView.C (updateTab): do not update early if current tab has
[lyx.git] / src / MenuBackend.C
index beaaa0cf711249e73ba6d2381f0c07b54d9e8f87..5419f6d8b718fb8ffa923724cd6e2073d18e3481 100644 (file)
@@ -134,7 +134,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 +144,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 "
@@ -413,10 +413,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 +536,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 +891,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);
                }
        }