Look for mathed xpms. Doesn't do anything yet due to lack of workable XPMs

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5152 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-08-29 06:00:29 +00:00
parent a7e6327ee1
commit bfefc79520
3 changed files with 16 additions and 19 deletions

View File

@ -1,3 +1,8 @@
2002-08-29 John Levon <levon@movementarian.org>
* Toolbar_pimpl.C: math xpm handling in preparation
for some fixed XPMs
2002-08-29 John Levon <levon@movementarian.org>
* QCommandBuffer.h:

View File

@ -19,7 +19,7 @@ QAbout
QCommandBuffer
- finish off, use listview etc.
- finish off
QContentPane
@ -79,4 +79,4 @@ QtView
Toolbar_pimpl
- mathed symbols (*)
- get some decent mathed XPMs

View File

@ -44,13 +44,17 @@ QPixmap getIconPixmap(int action)
{
FuncRequest f = lyxaction.retrieveActionArg(action);
string const name = lyxaction.getActionName(f.action);
string xpm_name;
if (f.action == LFUN_INSERT_MATH && !f.argument.empty()) {
xpm_name = "math/" + subst(f.argument, ' ', '_');
} else {
string const name = lyxaction.getActionName(f.action);
if (!f.argument.empty())
xpm_name = subst(name + ' ' + f.argument, ' ','_');
else
xpm_name = name;
}
string fullname = LibFileSearch("images", xpm_name, "xpm");
@ -60,18 +64,6 @@ QPixmap getIconPixmap(int action)
return QPixmap(fullname.c_str());
}
if (f.action == LFUN_INSERT_MATH && !f.argument.empty()) {
#if 0 // FIXME: GUII
char const ** pixmap =
get_pixmap_from_symbol(arg.c_str(), 30, 30);
if (pixmap) {
lyxerr[Debug::GUI] << "Using mathed-provided icon"
<< endl;
return QPixmap(pixmap);
}
#endif
}
lyxerr << "Unable to find icon `" << xpm_name << "'" << endl;
fullname = LibFileSearch("images", "unknown", "xpm");
if (!fullname.empty()) {