|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Disabling print range settings?Hi,
is there any way to disable or overwrite the print range in GtkPrintSettings? The implementation of printing in my application currently doesn't support a range of pages. So I'd like to disable the selection of such or at least to overwrite the user's choice. I tried this in the begin-print signal handler like this: GtkPrintSettings *lsettings; GtkPageRange range; lsettings = gtk_print_operation_get_print_settings(operation); gtk_print_settings_set_print_pages(lsettings, GTK_PRINT_PAGES_ALL); gtk_print_settings_set_page_set(lsettings, GTK_PAGE_SET_ALL); range.start = 0; range.end = dinfo->n_pages; gtk_print_settings_set_page_ranges(lsettings, &range, 1); gtk_print_operation_set_print_settings(operation, lsettings); But this seems to have no effect at all. The draw-page signal is fired only for the user selected pages but I need it to get fired for all pages. Any ideas? Regards, Enrico -- Get my GPG key from http://www.uvena.de/pub.asc _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
|
|
Re: Disabling print range settings?On Thu, 2008-05-15 at 14:33 +0200, Enrico Tröger wrote:
> is there any way to disable or overwrite the print range in > GtkPrintSettings? > > The implementation of printing in my application currently doesn't > support a range of pages. So I'd like to disable the selection of such > or at least to overwrite the user's choice. Wouldn't it be better to work on supporting a range of pages?? Easier said than done, I know, but still... e.g. print to /dev/null or a temporary file first, and notice where the page breaks were... Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org www.advogato.org _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
|
|
Re: Disabling print range settings?On Thu, 15 May 2008 09:23:18 -0400, Liam R E Quin <liam@...>
wrote: > On Thu, 2008-05-15 at 14:33 +0200, Enrico Tröger wrote: > > > is there any way to disable or overwrite the print range in > > GtkPrintSettings? > > > > The implementation of printing in my application currently doesn't > > support a range of pages. So I'd like to disable the selection of > > such or at least to overwrite the user's choice. > > Wouldn't it be better to work on supporting a range of pages?? the long term goal is of course to support ranges of pages but as long as it isn't implemented printing with a given range ends in the amount of pages the user specified but the actual content always starts at page 1. > Easier said than done, I know, but still... e.g. print to > /dev/null or a temporary file first, and notice where the > page breaks were... I thought of something similar: in the begin-print handler, I call the draw-page handler for all pages with a flag set to prevent actually adding any contents to the layout except for the pages that are desired. But it still needs to get done ;-). Regards, Enrico -- Get my GPG key from http://www.uvena.de/pub.asc _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
|
|
Re: Disabling print range settings?On Thu, 2008-05-15 at 17:00 +0200, Enrico Tröger wrote:
> On Thu, 15 May 2008 09:23:18 -0400, Liam R E Quin <liam@...> > wrote: [...] > > Wouldn't it be better to work on supporting a range of pages?? > > Sure would it be better but it would be also more time consuming... Understood. On the other hand, one day you'll need to undo whatever hack you put in now... and you'll have to deal with complaining users throwing their dirty socks at you. [...] > I thought of something similar: in the begin-print handler, I call the > draw-page handler for all pages with a flag set to prevent actually > adding any contents to the layout except for the pages that are > desired. But it still needs to get done ;-). I know, I know, and I'm not really helping very much, except to say, don't do the quick hack, do the right thing, if at all possible :-) Liam -- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org www.advogato.org _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
|
|
Re: Disabling print range settings?On Thu, 15 May 2008 11:28:56 -0400, Liam R E Quin <liam@...>
wrote: > On Thu, 2008-05-15 at 17:00 +0200, Enrico Tröger wrote: > > On Thu, 15 May 2008 09:23:18 -0400, Liam R E Quin <liam@...> > > wrote: > [...] > > > Wouldn't it be better to work on supporting a range of pages?? > > > > Sure would it be better but it would be also more time consuming... > Understood. On the other hand, one day you'll need to undo whatever > hack you put in now... and you'll have to deal with complaining users > throwing their dirty socks at you. I guess I really should make my code working with a given range of pages :(. Regards, Enrico -- Get my GPG key from http://www.uvena.de/pub.asc _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@... http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list |
| Free Forum Powered by Nabble | Forum Help |