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 370041 - gtk+ should call evince --preview --unlink-tempfile to signal temp pdf file to be removed
gtk+ should call evince --preview --unlink-tempfile to signal temp pdf file t...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
2.10.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-11-03 14:53 UTC by Ghee Teo
Modified: 2006-12-13 18:44 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
corrected patch to match that actual change in evince (297 bytes, patch)
2006-11-03 15:01 UTC, Ghee Teo
none Details | Review

Description Ghee Teo 2006-11-03 14:53:10 UTC
Please describe the problem:
gtkprintoperation has requested evince to provide a preview window for the temp PDF generated to be viewed with --preview option and assumme that the temp file  will be removed by evince when it finishes. However, it is no sufficient because other apps can also invoked evince using --preview option. 

So in http://bugzilla.gnome.org/show_bug.cgi?id=365282, a proposal is for evince now to accept --unlink-tempfile (a boolean). For this to work, gtkprintoperation now will have to changed to 
GTK_PRINT_PREVIEW_COMMAND="evince --unlink-tempfile --preview %f"


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Ghee Teo 2006-11-03 15:01:32 UTC
Created attachment 75937 [details] [review]
corrected patch to match that actual change in evince

this patch only work with http://bugzilla.gnome.org/show_bug.cgi?id=365282 integrated.
Comment 2 Ghee Teo 2006-12-13 10:11:40 UTC
Comment on attachment 75937 [details] [review]
corrected patch to match that actual change in evince

>--- Makefile.am	Tue Sep 26 14:16:28 2006
>+++ Makefile.am.hacked	Fri Nov  3 14:55:31 2006
>@@ -4,7 +4,7 @@
> 
> if OS_UNIX
> SUBDIRS += xdgmime
>-GTK_PRINT_PREVIEW_COMMAND="evince --preview %f"
>+GTK_PRINT_PREVIEW_COMMAND="evince --unlink-temp-file --preview %f"
> endif
> 
> DIST_SUBDIRS=theme-bits xdgmime
Comment 3 Ghee Teo 2006-12-13 10:16:37 UTC
Have updated the patch to match the actual changes made by carlos in http://bugzilla.gnome.org/show_bug.cgi?id=365282. So this will remove all the temparory file created by evince when gtk+ does a preview. 

As the evince changes is now in HEAD, this patch should also be made to HEAD o fix the bug  of lingering temp filecompletely.
Comment 4 Matthias Clasen 2006-12-13 14:43:02 UTC
This is fine to commmit to HEAD. I'd rather not put it on the stable branch, since I don't know how well current evince handles unknown options.
Comment 5 Ghee Teo 2006-12-13 17:44:51 UTC
Hi Matthias, you are right. It is also no rush in getting this into the stable branch since the severity of the bug is normal I guess.

Evince just exits if it is unknown option ;(.

Can you commit the patch to HEAD please. I am still in the mess of sorting out my cvs account. (bad me).THANKS!
Comment 6 Matthias Clasen 2006-12-13 18:44:55 UTC
2006-12-13  Matthias Clasen  <mclasen@redhat.com>

        * gtk/Makefile.am: Add --unlink-tempfile to the evince call
        for print preview.  (#370041, Ghee Teo)