/**
* \file Toolbar_pimpl.C
* Copyright 1995 Matthias Ettrich
- * Copyright 1995-2001 The LyX Team.
* Copyright 1996-1998 Lars Gullik Bjønnes
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * \author Lars Gullik Bjønnes, larsbj@lyx.org
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
*/
// Added pseudo-action handling, asierra 180296
#include "FuncStatus.h"
#include "buffer.h"
#include "funcrequest.h"
-#include "MathsSymbols.h"
#include "gettext.h"
#include "Tooltips.h"
#include FORMS_H_LOCATION
}
-void setPixmap(FL_OBJECT * obj, int action, int buttonwidth, int height)
+void setPixmap(FL_OBJECT * obj, int action)
{
string xpm_name;
FuncRequest ev = lyxaction.retrieveActionArg(action);
string fullname = LibFileSearch("images", xpm_name, "xpm");
+ if (ev.action == LFUN_INSERT_MATH && !ev.argument.empty()) {
+ string arg = ev.argument.substr(1);
+ fullname = LibFileSearch("images/math/", arg, "xpm");
+ }
+
if (!fullname.empty()) {
lyxerr[Debug::GUI] << "Full icon name is `"
<< fullname << "'" << endl;
return;
}
- if (ev.action == LFUN_INSERT_MATH && !ev.argument.empty()) {
- char const ** pixmap = get_pixmap_from_symbol(ev.argument.c_str(),
- buttonwidth,
- height);
- if (pixmap) {
- lyxerr[Debug::GUI] << "Using mathed-provided icon"
- << endl;
- fl_set_pixmapbutton_data(obj,
- const_cast<char **>(pixmap));
- return;
- }
- }
-
lyxerr << "Unable to find icon `" << xpm_name << "'" << endl;
fullname = LibFileSearch("images", "unknown", "xpm");
if (!fullname.empty()) {
// The view that this object belongs to.
obj->u_vdata = owner_;
- setPixmap(obj, action, buttonwidth, height);
+ setPixmap(obj, action);
// we must remember to update the positions
xpos += buttonwidth;
// ypos is constant