]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Toolbar.C
fix tooltips in toolbar
[lyx.git] / src / frontends / Toolbar.C
index a86608677187fab2692ca73695cf14ec3a833390..ad2d95313a358f4891f6101143f17aa70944cce4 100644 (file)
@@ -23,19 +23,17 @@ using std::endl;
 extern LyXAction lyxaction;
 
 
-Toolbar::Toolbar(LyXView * o, int x, int y, ToolbarDefaults const &tbd)
+Toolbar::Toolbar(LyXView * o, Dialogs & d,
+                int x, int y, ToolbarDefaults const &tbd)
        : last_textclass_(-1)
 {
-       pimpl_ = new Pimpl(o, x, y);
-
-       pimpl_->reset();
+       pimpl_ = new Pimpl(o, d, x, y);
 
        // extracts the toolbar actions from tbd
        for (ToolbarDefaults::const_iterator cit = tbd.begin();
             cit != tbd.end(); ++cit) {
                pimpl_->add((*cit));
-               lyxerr[Debug::GUI] << "tool action: "
-                                      << (*cit) << endl;
+               lyxerr[Debug::GUI] << "tool action: " << (*cit) << endl;
        }
 }
 
@@ -46,24 +44,6 @@ Toolbar::~Toolbar()
 }
 
 
-void Toolbar::set(bool doingmain)
-{
-       pimpl_->set(doingmain);
-}
-
-
-void Toolbar::activate()
-{
-       pimpl_->activate();
-}
-
-
-void Toolbar::deactivate()
-{
-       pimpl_->deactivate();
-}
-
-
 void Toolbar::update()
 {
        pimpl_->update();
@@ -101,22 +81,3 @@ void Toolbar::clearLayoutList()
 {
        pimpl_->clearLayoutList();
 }
-
-
-void Toolbar::push(int nth)
-{
-       pimpl_->push(nth);
-}
-
-
-void Toolbar::add(string const & func, bool doclean)
-{
-       int const tf = lyxaction.LookupFunc(func);
-
-       if (tf == -1) {
-               lyxerr << "Toolbar::add: no LyX command called`"
-                      << func << "'exists!" << endl;
-       } else {
-               pimpl_->add(tf, doclean);
-       }
-}