On Sat, 11 Mar 2000, Angus Leeming wrote:

>       // the print form
>       fl_set_input(fd_form_print->input_printer, lyxrc->printer.c_str());     
> where lyxrc is a global LyXRC variable and the call
[...] 
> Ultimately, therefore, create_forms() creates a vector of
> Dialogs, one of which is the Print Dialog which contains
> the private data "input_printer". It is this (in its old
> form) that is being set right at the top of this page in
> LyXGUI::init():
> 
>       fl_set_input(fd_form_print->input_printer, lyxrc->printer.c_str());     
> 
> I propose that the Dialogs constructor be modified to:
>       Dialogs(LyXFunc * lyxfunc, LyXRC const & lyxrc )
> so that this info can be passed into FormPrint when it is
> constructed (and any other similar information to the other
> dialogs). This would clean up the main code, removing
> GUI-specific stuff to where it belongs, somewhere behind
> Dialogs.h.
> 
> Is this a Good Idea?

You'll also notice that in the old lyx module FormPrint::update() calls
getPrinterParams() and the PrinterParams includes the input_printer value.
This value is then assigned to popup->input_printer.  LyXRC is thus not
needed for this case.  Although LyXRC is used in the old Communicator
method getPrinterParams and hence will be used in LyXFunc.

Therefore,  LyXRC should only be needed by LyXFunc not any of the gui code
if we set things up right.

Allan. (ARRae)

Reply via email to