diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index a97e3f2c47..b697fff579 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-08-29 John Levon + + * Toolbar_pimpl.C: math xpm handling in preparation + for some fixed XPMs + 2002-08-29 John Levon * QCommandBuffer.h: diff --git a/src/frontends/qt2/TODO b/src/frontends/qt2/TODO index 10a84c3f83..ae46ec8fbd 100644 --- a/src/frontends/qt2/TODO +++ b/src/frontends/qt2/TODO @@ -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 diff --git a/src/frontends/qt2/Toolbar_pimpl.C b/src/frontends/qt2/Toolbar_pimpl.C index b7e824fb43..062c24d712 100644 --- a/src/frontends/qt2/Toolbar_pimpl.C +++ b/src/frontends/qt2/Toolbar_pimpl.C @@ -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.argument.empty()) - xpm_name = subst(name + ' ' + f.argument, ' ','_'); - else - xpm_name = 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()) {