Abdelrazak Younes wrote:

> Georg Baum wrote:
>> Abdelrazak Younes wrote:
>> 
>>> OK, the problem is that BufferList was created in Application which is
>>> created only in GUI mode. I wanted to create a "console mode" frontend
>>> to cope with this and with all the lyx::use_gui test but I don't have
>>> the time right now.
>> 
>> While such a frontend would be nice e.g. for batch processing on a
>> machine that does not have an X server it will not be possible to remove
>> the lyx::use_gui test, at least not if the GUI version should still be
>> able to process batch commands.
> 
> Why is that?

Because even a qt4 frontend can be run in text-only mode. In that case no
popups should appear, no GUI fonts should be loaded etc.

> The batch command processing is done in LyXFunc and it does not need
> this use_gui boolean.

> There surely is a misunderstanding here. My goal is to remove the use of
> lyx::use_gui inside the (qt4) frontend where it is just not needed
> because we are obviously using a GUI.

If you could manage to not enter the qt event loop at all if only batch
processing is requested that would be even better. That would mean that we
don't need a separate frontend (== separate executable) for batch
processing.
But it looks to me that there is still a misunderstanding concerning the
fact that even a gui frontend need to behave like a text frontend if only
batch processing is requested.

> But I maybe see the need for an "Application::useGui()" that will return
> true for GuiApplication and false for some future ConsoleApplication.

That would not help IMO, since also a GuiApplication could be run in
GUI-less mode.


Georg

Reply via email to