mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
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:
parent
a7e6327ee1
commit
bfefc79520
@ -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>
|
2002-08-29 John Levon <levon@movementarian.org>
|
||||||
|
|
||||||
* QCommandBuffer.h:
|
* QCommandBuffer.h:
|
||||||
|
@ -19,7 +19,7 @@ QAbout
|
|||||||
|
|
||||||
QCommandBuffer
|
QCommandBuffer
|
||||||
|
|
||||||
- finish off, use listview etc.
|
- finish off
|
||||||
|
|
||||||
QContentPane
|
QContentPane
|
||||||
|
|
||||||
@ -79,4 +79,4 @@ QtView
|
|||||||
|
|
||||||
Toolbar_pimpl
|
Toolbar_pimpl
|
||||||
|
|
||||||
- mathed symbols (*)
|
- get some decent mathed XPMs
|
||||||
|
@ -44,13 +44,17 @@ QPixmap getIconPixmap(int action)
|
|||||||
{
|
{
|
||||||
FuncRequest f = lyxaction.retrieveActionArg(action);
|
FuncRequest f = lyxaction.retrieveActionArg(action);
|
||||||
|
|
||||||
string const name = lyxaction.getActionName(f.action);
|
|
||||||
string xpm_name;
|
string xpm_name;
|
||||||
|
|
||||||
if (!f.argument.empty())
|
if (f.action == LFUN_INSERT_MATH && !f.argument.empty()) {
|
||||||
xpm_name = subst(name + ' ' + f.argument, ' ','_');
|
xpm_name = "math/" + subst(f.argument, ' ', '_');
|
||||||
else
|
} else {
|
||||||
xpm_name = name;
|
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");
|
string fullname = LibFileSearch("images", xpm_name, "xpm");
|
||||||
|
|
||||||
@ -60,18 +64,6 @@ QPixmap getIconPixmap(int action)
|
|||||||
return QPixmap(fullname.c_str());
|
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;
|
lyxerr << "Unable to find icon `" << xpm_name << "'" << endl;
|
||||||
fullname = LibFileSearch("images", "unknown", "xpm");
|
fullname = LibFileSearch("images", "unknown", "xpm");
|
||||||
if (!fullname.empty()) {
|
if (!fullname.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user