]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiToolbar.cpp
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / GuiToolbar.cpp
index bea9b551b8b13d12610616572038dc673c66e7d8..5a0edfa335419e3fe1557a0411f677517c498614 100644 (file)
@@ -174,11 +174,15 @@ MenuButton::MenuButton(GuiToolbar * bar, ToolbarItem const & item, bool const st
        setStatusTip(label);
        setText(label);
        QString const name = toqstr(tbitem_.name_);
-       FileName const fname = libFileSearch("images/math/", name, "png");
-       if (fname.exists())
-           setIcon(QIcon(getPixmap("images/math/", name, "png")));
-       else
-           setIcon(QIcon(getPixmap("images/", name, "png")));
+       QString imagedir = "images/math/";
+       FileName const fname = imageLibFileSearch(imagedir, name, "png");
+       if (fname.exists()) {
+               setIcon(QIcon(getPixmap(imagedir, name, "png")));
+       } else {
+               imagedir = "images/";
+               imageLibFileSearch(imagedir, name, "png");
+               setIcon(QIcon(getPixmap(imagedir, name, "png")));
+       }
        if (sticky)
                connect(this, SIGNAL(triggered(QAction *)),
                        this, SLOT(actionTriggered(QAction *)));
@@ -331,8 +335,7 @@ void GuiToolbar::restoreSession()
                settings.value(sessionKey() + "/visibility", error_val).toInt();
        if (visibility == error_val || visibility == 0) {
                // This should not happen, but in case we use the defaults
-               LYXERR0("Session settings could not be found!. "
-                       "Defaults are used instead");
+               LYXERR0("Session settings could not be found! Defaults are used instead.");
                visibility = 
                        guiApp->toolbars().defaultVisibility(fromqstr(objectName()));
        }