small fix, strip argument for icon search, if with argument failed

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6740 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2003-04-09 02:23:47 +00:00
parent a2eb2cb918
commit 80837fb324
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-04-09 John Levon <levon@movementarian.org>
* ToolbarBackend.C: try icon without argument
if with argument fails
2003-04-08 John Levon <levon@movementarian.org> 2003-04-08 John Levon <levon@movementarian.org>
* ToolbarBackend.h: * ToolbarBackend.h:

View File

@ -142,8 +142,12 @@ string const ToolbarBackend::getIcon(int action)
xpm_name = subst(name + ' ' + f.argument, ' ', '_'); 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");
}
}
if (!fullname.empty()) { if (!fullname.empty()) {
lyxerr[Debug::GUI] << "Full icon name is `" lyxerr[Debug::GUI] << "Full icon name is `"