Re: Problem with preview and the blocking print dialog



On Wed, 10 May 2006, John (J5) Palmieri wrote:

> I'm implementing the preview code in gtkprint.  I have decided to use an
> external helper (default is evince) to do print preview.  The idea was
> to write out to a pdf in /tmp and launch the external helper when the
> user hits the preview button.  The print dialog would stick around even
> after the preview button was pressed.  The issue with the blocking
> dialog is that, while we can keep the dialog from going away, the way
> the code is structured right now we would have to wait until the preview
> was done before reattaching to gtk_dialog_run.  This leaves a gap where
> the user can hit a button on the dialog and nothing will happen.

Do we want to allow the user to actually change anything while generating 
the preview? That strikes me as a bit tricky. Do you expect the generated 
preview to contain that change or not?
 
> There are a couple of solutions as I see them:
> 
> 1) We could gray out the dialog while the preview is being generated

A simple way to do this would be to add a progress dialog for the preview 
generation and make that modal to the printer dialog.
 
> 2) Restructure  _gtk_print_operation_platform_backend_run_dialog so that
> we setup the print before we return instead of it happening in the
> calling function.

Exactly what do you mean by this?

> 3) Move to a completely async dialog

This is not possible at all on Win32. 

How do you propose print preview to work on win32 btw? We can't launch 
evince there, can we? 

Also, is the preview stuff just gonna be a feature of the print dialog, or 
will it be availible in the API. (So you can add a print preview menu item 
to your app if you want.)
 
> With 1 we need to figure out a way to reenter
> _gtk_print_operation_platform_backend_run_dialog without cleaning up or
> reinitializing data. 
> 
> With 2 we end up possibly duplicating code across platforms

Not having looked at this in detail, can we not pass the print_pages 
function into _gtk_print_operation_platform_backend_run_dialog, like we do 
in the async case. 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a maverick Republican master criminal on the run. She's a mistrustful 
impetuous cab driver with a birthmark shaped like Liberty's torch. They fight 
crime! 



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