]> git.lyx.org Git - lyx.git/blobdiff - src/ToolbarBackend.C
minimal effort implementation of:
[lyx.git] / src / ToolbarBackend.C
index baa2ddfbcdfaf57865410b8aaaf1f53a02978fb4..6521d5369d2210045c0baae02d72feb5c7b336c8 100644 (file)
@@ -25,7 +25,7 @@
 
 using lyx::support::compare_ascii_no_case;
 using lyx::support::getVectorFromString;
-using lyx::support::LibFileSearch;
+using lyx::support::libFileSearch;
 using lyx::support::subst;
 
 using std::endl;
@@ -217,23 +217,27 @@ string const ToolbarBackend::getIcon(FuncRequest const & f)
 
        string fullname;
 
-       if (f.action == LFUN_INSERT_MATH) {
+       switch (f.action) {
+       case LFUN_MATH_INSERT:
                if (!f.argument.empty())
                        fullname = find_xpm(f.argument.substr(1));
-       } else if (f.action == LFUN_MATH_DELIM) {
+               break;
+       case LFUN_MATH_DELIM:
+       case LFUN_MATH_BIGDELIM:
                fullname = find_xpm(f.argument);
-       } else {
+               break;
+       default:
                string const name = lyxaction.getActionName(f.action);
                string xpm_name(name);
 
                if (!f.argument.empty())
                        xpm_name = subst(name + ' ' + f.argument, ' ', '_');
 
-               fullname = LibFileSearch("images", xpm_name, "xpm");
+               fullname = libFileSearch("images", xpm_name, "xpm");
 
                if (fullname.empty()) {
                        // try without the argument
-                       fullname = LibFileSearch("images", name, "xpm");
+                       fullname = libFileSearch("images", name, "xpm");
                }
        }
 
@@ -246,5 +250,5 @@ string const ToolbarBackend::getIcon(FuncRequest const & f)
        lyxerr[Debug::GUI] << "Cannot find icon for command \""
                           << lyxaction.getActionName(f.action)
                           << '(' << f.argument << ")\"" << endl;
-       return LibFileSearch("images", "unknown", "xpm");
+       return libFileSearch("images", "unknown", "xpm");
 }