Jose' Matos wrote: >> Ok, José, the attached patch should make your life easy. You'll >> need to invoke the dialog as >> <lyxview>.getDialogs().show("log", "lyx2lyx <errorfile>"); >> where <lyxview> is the LyXView variable ('*owner') in >> LyXFunc::dispatch.
> And where should I do this? I don't know really. The calls to lyx2lyx are from here, no? bool Buffer::readFile(LyXLex & lex, string const & filename, ParagraphList::iterator pit) So, somehow we must gain access to a dispatch method. Hmmm. Two possibilities are available. 1. Pass a LyXView const & to readFile. Ugly. 2. The correct solution IMO, is to have a LyX::dispatch member function. (LyX is a singleton class, so this can be accessed as FuncRequest cmd(LFUN_DIALOG_SHOW, "log lyx2lyx <logfile>"); LyX::ref().dispatch(cmd); LyX will pass this on to the first (currently only) of its LyXView variables. class LyX : boost::noncopyable { public: ... void dispatch(FuncRequest const & cmd) { switch (cmd.action) { case LFUN_DIALOG_SHOW: ViewList::iterator view = views_.begin(); view->dispatch(cmd); break; } } private: typedef std::list<boost::shared_ptr<LyXView> > ViewList; ViewList views_; }; -- Angus