]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/Toolbars.cpp
Fix the tab ordering of GuiDocument components.
[lyx.git] / src / frontends / qt4 / Toolbars.cpp
index bd1c9af7639f41c9e2d6ad4888501ebec59edc07..53f4cd6103dbf94fec0d135926c815bb34c527c1 100644 (file)
@@ -23,7 +23,7 @@
 #include "support/gettext.h"
 #include "support/lstrings.h"
 
-#include <boost/bind.hpp>
+#include "support/bind.h"
 
 #include <algorithm>
 
@@ -55,7 +55,7 @@ ToolbarItem::ToolbarItem(Type type, string const & name, docstring const & label
 void ToolbarInfo::add(ToolbarItem const & item)
 {
        items.push_back(item);
-       items.back().func_.origin = FuncRequest::TOOLBAR;
+       items.back().func_.setOrigin(FuncRequest::TOOLBAR);
 }
 
 
@@ -74,7 +74,7 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                TO_EXPORTFORMATS,
                TO_IMPORTFORMATS,
                TO_UPDATEFORMATS,
-               TO_VIEWFORMATS,
+               TO_VIEWFORMATS
        };
 
        struct LexerKeyword toolTags[] = {
@@ -154,7 +154,7 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                                add(ToolbarItem(ToolbarItem::POPUPMENU, name, label));
                        }
                        break;
-               
+
                case TO_STICKYPOPUPMENU:
                        if (lex.next(true)) {
                                string const name = lex.getString();
@@ -210,7 +210,7 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                                docstring const prettyname =
                                        from_utf8((*fit)->prettyname());
                                docstring tooltip;
-                               FuncCode lfun;
+                               FuncCode lfun = LFUN_NOACTION;
                                switch (code) {
                                case TO_EXPORTFORMATS:
                                        lfun = LFUN_BUFFER_EXPORT;
@@ -218,7 +218,7 @@ ToolbarInfo & ToolbarInfo::read(Lexer & lex)
                                        break;
                                case TO_IMPORTFORMATS:
                                        lfun = LFUN_BUFFER_IMPORT;
-                                       tooltip = _("Import %1$s ...");
+                                       tooltip = _("Import %1$s");
                                        break;
                                case TO_UPDATEFORMATS:
                                        lfun = LFUN_BUFFER_UPDATE;
@@ -267,7 +267,7 @@ void Toolbars::readToolbars(Lexer & lex)
 {
        enum {
                TO_TOOLBAR = 1,
-               TO_ENDTOOLBARSET,
+               TO_ENDTOOLBARSET
        };
 
        struct LexerKeyword toolTags[] = {
@@ -358,6 +358,8 @@ void Toolbars::readToolbarSettings(Lexer & lex)
                                flag = RIGHT;
                        else if (!compare_ascii_no_case(*cit, "auto"))
                                flag = AUTO;
+                       else if (!compare_ascii_no_case(*cit, "samerow"))
+                               flag = SAMEROW;
                        else {
                                LYXERR(Debug::ANY,
                                        "Toolbars::readToolbarSettings: unrecognised token:`"
@@ -368,7 +370,7 @@ void Toolbars::readToolbarSettings(Lexer & lex)
                }
                toolbar_visibility_[name] = visibility;
 
-               if (visibility >= MATH) {
+               if (visibility & ALLOWAUTO) {
                        if (ToolbarInfo const * ti = info(name))
                                const_cast<ToolbarInfo *>(ti)->gui_name +=
                                        " (" + _("auto") + ")";