void MiniBuffer::ExecutingCB(FL_OBJECT *ob, long)
{
MiniBuffer *obj = (MiniBuffer*)ob->u_vdata;
void MiniBuffer::ExecutingCB(FL_OBJECT *ob, long)
{
MiniBuffer *obj = (MiniBuffer*)ob->u_vdata;
fl_set_focus_object(obj->owner->getForm(),
obj->owner->currentView()->getWorkArea());
if (obj->cur_cmd.empty()) {
fl_set_focus_object(obj->owner->getForm(),
obj->owner->currentView()->getWorkArea());
if (obj->cur_cmd.empty()) {
// Check if the name is valid (ale)
// No, let the dispatch functions handle that.
//int action = lyxaction.LookupFunc(function.c_str());
// Check if the name is valid (ale)
// No, let the dispatch functions handle that.
//int action = lyxaction.LookupFunc(function.c_str());
// Dispatch only returns requested data for a few commands (ale)
string res=obj->owner->getLyXFunc()->Dispatch(function.c_str(),
arg.c_str());
// Dispatch only returns requested data for a few commands (ale)
string res=obj->owner->getLyXFunc()->Dispatch(function.c_str(),
arg.c_str());
/* if (!res.empty())
if(obj->owner->getLyXFunc()->errorStat())
obj->Set(_("Error:"), _(res.c_str()), string(), 4);
/* if (!res.empty())
if(obj->owner->getLyXFunc()->errorStat())
obj->Set(_("Error:"), _(res.c_str()), string(), 4);