On Mon, 2006-05-01 at 12:48 +0200, Paolo Maggi wrote: > [Resending since it seems my previous mail was sent from the wrong address] > > Hi > > > I'm not sure what is the best way to avoid problems with pagination > > blocking the ui for a long time. Alex opened a bug about allowing > rendering > > to happen in a thread. > > > > What about adding a "paginator" interface that programs must/can > implement? > A "paginator" emits signals while proceeding, this signal can be used by > gtk+ or by the program itself to show a progress bar or similar UI > element. > > The GtkPrintPaginator interface should emit three signals: > > - begin_page (GtkPrintPaginator *p): emitted when starting to paginate a > new page > - finished (GtkPrintPaginator *p): emitted when pagination ends > - canceled (GtkPrintPaginator *p): if pagination is canceled
It looks strange to me to have the paginator canceling. Surely its the dialog showed by GtkPrintOperation that does the actual cancel? I guess it might be useful if you do your own progress dialog. > The interface should have at least the following methods: > > - setup: to pass the GtkPrintContext, GtkPageSetup and GtkPrintSettings > (may other info are needed for the pagination too) > - paginate: to start pagination > - cancel: to cancel pagination > - get_page: returns the number of the page being paginated > - get_page_count: determines the total number of pages the job will > print; the returned value is only meaningful after pagination has > finished. > > We can then add the following operations to GtkPrintOperation: > > void gtk_print_operation_set_paginator (GtkPrintOperation *op, > GtkPrintPaginator *p); > > void gtk_print_operation_set_show_pagination_progress > (GtkPrintOperation *op, > gboolean show_progress); Yes, something like this should be quite workable. Would you be interested in looking at implementing this? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Alexander Larsson Red Hat, Inc [EMAIL PROTECTED] [EMAIL PROTECTED] He's an impetuous pirate werewolf searching for his wife's true killer. She's a time-travelling hip-hop soap star with an incredible destiny. They fight crime! _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list