]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarBackend.C
Real fix from Bernhard Roider
[lyx.git] / src / ToolbarBackend.C
index 6f459bd095353e99769ef768ab03b25aa0eefae0..b12fed44df1b0f956d33e2acc45285935a02072b 100644 (file)
@@ -97,7 +97,7 @@ void ToolbarBackend::read(LyXLex & lex)
                switch (lex.lex()) {
                case TO_ADD:
                        if (lex.next(true)) {
-                               docstring const tooltip = _(lex.getString());
+                               docstring const tooltip = translateIfPossible(lex.getDocString());
                                lex.next(true);
                                string const func_arg = lex.getString();
                                lyxerr[Debug::PARSER]
@@ -186,6 +186,8 @@ void ToolbarBackend::readToolbars(LyXLex & lex)
                                flag = MATH;
                        else if (!compare_ascii_no_case(*cit, "table"))
                                flag = TABLE;
+                       else if (!compare_ascii_no_case(*cit, "review"))
+                               flag = REVIEW;
                        else if (!compare_ascii_no_case(*cit, "top"))
                                flag = TOP;
                        else if (!compare_ascii_no_case(*cit, "bottom"))
@@ -210,7 +212,7 @@ void ToolbarBackend::add(Toolbar & tb,
                         FuncRequest const & func, docstring const & tooltip)
 {
        tb.items.push_back(make_pair(func, tooltip));
-       tb.items.back().first.origin = FuncRequest::UI;
+       tb.items.back().first.origin = FuncRequest::TOOLBAR;
 }
 
 
@@ -236,11 +238,11 @@ string const ToolbarBackend::getIcon(FuncRequest const & f)
                if (!f.argument().empty())
                        xpm_name = subst(name + ' ' + to_utf8(f.argument()), ' ', '_');
 
-               fullname = libFileSearch("images", xpm_name, "xpm");
+               fullname = libFileSearch("images", xpm_name, "xpm").absFilename();
 
                if (fullname.empty()) {
                        // try without the argument
-                       fullname = libFileSearch("images", name, "xpm");
+                       fullname = libFileSearch("images", name, "xpm").absFilename();
                }
        }
 
@@ -253,7 +255,7 @@ string const ToolbarBackend::getIcon(FuncRequest const & f)
        lyxerr[Debug::GUI] << "Cannot find icon for command \""
                           << lyxaction.getActionName(f.action)
                           << '(' << to_utf8(f.argument()) << ")\"" << endl;
-       return libFileSearch("images", "unknown", "xpm");
+       return libFileSearch("images", "unknown", "xpm").absFilename();
 }