After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 662160 - gtk_print_operation_cancel fails
gtk_print_operation_cancel fails
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
3.0.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
: 662056 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-10-19 04:21 UTC by Andreas J. Guelzow
Modified: 2011-11-07 18:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tentative patch (1.35 KB, patch)
2011-10-21 23:35 UTC, Morten Welinder
none Details | Review
Tentative patch (1.35 KB, patch)
2011-10-21 23:38 UTC, Morten Welinder
accepted-commit_now Details | Review

Description Andreas J. Guelzow 2011-10-19 04:21:42 UTC
When gtk_print_operation_cancel is called from the draw-page handler of a preview operation (using the default pdf review), it fails to stop the operation. It does work correctly for a print operation, even for a print operation when printing to a file!

As an example, use Gnumeric from current git and the file from bug #662056.
When previewing try to stop the preview by clicking cancel. This should cancel the operation via gtk_print_operation_cancel bu tfails!
Comment 1 Morten Welinder 2011-10-19 13:50:05 UTC
It doesn't look like preview_print_idle (in gtkprintoperation.c)
has any idea that the operation might be cancelled.  This is in
contrast to print_pages_idle.
Comment 2 Andreas J. Guelzow 2011-10-20 18:27:04 UTC
*** Bug 662056 has been marked as a duplicate of this bug. ***
Comment 3 Morten Welinder 2011-10-21 23:35:40 UTC
Created attachment 199708 [details] [review]
Tentative patch

This patch implements cancels for previews.

Ok to commit?
Comment 4 Morten Welinder 2011-10-21 23:38:06 UTC
Created attachment 199709 [details] [review]
Tentative patch

This patch implements cancels for previews.

Ok to commit?
Comment 5 Marek Kašík 2011-11-07 17:17:03 UTC
Review of attachment 199709 [details] [review]:

The patch looks good to me.

Thank you

Marek
Comment 6 Morten Welinder 2011-11-07 18:16:23 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.