[PATCH] Re: gEDA-dev: libgeda, gschem: New print dialog

Patrick Bernaud b-patrick at wanadoo.fr
Wed Aug 2 11:26:45 EDT 2006


Hi,

Peter TB Brett writes:
 > [...]
 > >   - have you considered the possibility of not connecting the toplevel
 > >     to the print dialog? It would further separate code for action
 > >     and GUI. Plus you do not modify the toplevel before the user
 > >     validates the dialog
 > >
 > >     I mean: adding properties for paper size, type, orientation
 > >     and output type (but not toplevel) to PrintDialog. In
 > >     x_print_setup(), using gtk_dialog_run() and waiting for the user
 > >     to click a button and depending on the return code retrieve the
 > >     options from the dialog. Contents of print_dialog_action_print()
 > >     would be moved to x_print_setup().
 > >
 > >     Not sure I am clear here. I can elaborate if you want.
 > 
 > I'll have a look tomorrow morning and see what I can do.  I'm not at all sure 
 > how to populate the paper sizes dialog with that setup -- pass in a GPtrArray 
 > as a property?
 > 

You can retrieve the paper sizes by using libgeda s_papersize_get()
from the constructor of the dialog (as you already do). 

>From x_print_setup() the current papersize can be searched given the
width and height from toplevel. This index is passed to the dialog as
a property to select the correct paper in the combobox.

Regards,


Patrick


More information about the geda-dev mailing list