Re: Printing and blocking ui



On Thu, 2006-06-15 at 14:04 -0500, Yevgen Muntyan wrote:
> Hi there,
> 
> I print a text document from GtkTextView here. There is a problem
> with pagination: pagination is potentially slow, so some sort of progress
> dialog should be shown during it. From the other hand, the text buffer
> must not be modified during pagination.
> How to solve it? Should I show my own modal dialog and make sure user
> doesn't modify the buffer, or GtkPrintOperation can take care of it?

This is supported now with the Gtkprintoperation::paginate signal and
gtk_print_operation_set_show_progress().

> Actually, it would be good to ensure printing blocks the text widget too,
> since in this case it wouldn't be necessary to calculate and store all 
> the pango
> layouts in begin-print. Maybe just show a modal dialog between begin-print
> and end-print.

Locking the editing widget is probably something you have to do
yourself. You could also do a snapshot of the data at print time.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an otherworldly guerilla ex-con with a secret. She's a scantily clad 
belly-dancing widow who can talk to animals. They fight crime! 




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