Re: The printing work has been merged

On Sat, 2006-03-25 at 13:05 -0600, Yevgen Muntyan wrote:

> >I don't understand why you would need a call to get the default printer
> >settings. Of course the dialog comes up with the printer defaults if you
> >do nothing special.
> >  
> >
> Well, I don't need those default settings at all. I just want
> to be sure that I show Page Setup and Print dialogs with
> the settings which were chosen by user elsewhere. As far
> as I understood, new GtkPrintOperation object will be
> correctly set up, and I only need to store page setup and
> print settings during the session, correct?

Its really up to the application. You can either just store the objects
during the session, which is probably ok for some apps. Or you could
serialise them either in the preferences (gives you per-app print
defaults) or in the document (gives you per-document print defaults).

> >Print preview isn't handled yet. We'll see how it turns out. There is no
> >need for a draw_preview of course, since the normal draw_page works
> >fine.
> I was thinking about pagination: if you need to draw a preview
> of one first page, you don't have to split whole document into
> pages; and if you need to print whole document, you need to
> split it completely. So, there should be some different signal
> for preview, or some 'setup' signal which would tell about
> what's going on, or something like that.

Having a gtk_print_context_is_preview like alexg proposed sounds like a
good thing.

> Pagination can be expensive; e.g. if you are printing a text document
> containing different fonts, it's pretty much impossible to guess
> something without going through whole document, and
> calculating every line. So there should be some progress dialog
> in Print dialog before user is even able to click Print?

At the moment we do require that the page count is set, either before or
in the begin_print signal handler. Maybe we can do better on this.

> Yet another thing, it might be necessary to specify custom print
> ranges, like "lines from M to N" instead of page range (e.g. printing
> terminal content). Will there be something like what gnome-print
> has for print ranges?

There is only page range, all pages or current page (if you set it) at
the moment. Its also limited by what we can do on the other platforms,
as we need all the features to be portable.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an underprivileged hunchbacked astronaut gone bad. She's a mentally 
unstable mute socialite descended from a line of powerful witches. They fight 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]