]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbar.C
Make M-x show the minibuffer
[lyx.git] / src / frontends / Toolbar.C
index d83e149af13fbee401f9b90bcfdd485c05906196..1674f5ee7e6102d68ef3fe3983250ca74338a6ee 100644 (file)
@@ -16,6 +16,8 @@
 #include "LyXAction.h"
 #include "ToolbarBackend.h"
 
+using std::string;
+using std::endl;
 
 Toolbar::Toolbar()
        : last_textclass_(-1)
@@ -39,6 +41,23 @@ void Toolbar::init()
 }
 
 
+void Toolbar::display(string const & name, bool show)
+{
+       ToolbarBackend::Toolbars::const_iterator cit = toolbarbackend.begin();
+       ToolbarBackend::Toolbars::const_iterator end = toolbarbackend.end();
+
+       for (; cit != end; ++cit) {
+               if (cit->name == name) {
+                       displayToolbar(*cit, show);
+                       return;
+               }
+       }
+
+       lyxerr[Debug::GUI] << "Toolbar::display: no toolbar named "
+               << name << endl;
+}
+
+
 void Toolbar::update(bool in_math, bool in_table)
 {
        update();