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 720628 - Print to existing file gui missing a button
Print to existing file gui missing a button
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Printing
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 724605 730104 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-12-17 19:32 UTC by David Ronis
Modified: 2014-05-14 06:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Show "Replace" button when printing to existing file (807 bytes, patch)
2014-01-20 14:54 UTC, Marek Kašík
committed Details | Review
Show "Replace" button when printing to existing file (master) (2.19 KB, patch)
2014-01-20 14:56 UTC, Marek Kašík
committed Details | Review
Show "Replace" button when printing to existing file (3.11.4) (2.24 KB, patch)
2014-01-21 09:56 UTC, Marek Kašík
committed Details | Review

Description David Ronis 2013-12-17 19:32:35 UTC
I'm running gnumeric 1.12.9, but I'm pretty sure that this problem has been around for a while.  In any event, if I try to print to an existing file, I (correctly) get a pop-up telling me that the file "xxx.pdf" exists and do I want to replace it.  The pop-up only has a cancel button.

For what it's worth,  as similar pop-up when exporting as a pdf file works as expected.
Comment 1 Jean Bréfort 2013-12-18 05:19:40 UTC
I can't reproduce, I see the two expected buttons.
Comment 2 Jean Bréfort 2013-12-18 05:35:30 UTC
Hmm, which gtk+ version do you use?
Comment 3 David Ronis 2013-12-18 06:45:46 UTC
I'm using the current development release; i.e., 3.11.2.  (Although I suspect, I'll be upgrading to 11.3 tomorrow :)).   As I mentioned this has happened for a while, and I follow the development releases of gtk+.
Comment 4 Jean Bréfort 2013-12-18 10:22:11 UTC
It does not happen for me with gtk+-3.8.6, and this dialog is provided by gtk+ as far as I know. We don't call it directly.
Comment 5 David Ronis 2013-12-18 16:54:07 UTC
Interesting.   It doesn't happen here if I use data->export->export to other format and choose pdf (i.e., it works as expected).   Shouldn't the same dialog be used for this and print to file?
Comment 6 Morten Welinder 2013-12-19 02:52:12 UTC
Doesn't happen here with 3.8.7; the win32 binary under wine doesn't give
me a print dialog at all.
Comment 7 Morten Welinder 2013-12-19 02:56:48 UTC
The print-to-file dialog is in gtk+, not in gnumeric.

Tossing to gtk+ under the assumption that the problem resides there.
Comment 8 Jan-Michael Brummer 2014-01-15 20:26:40 UTC
This also happens with recent GTK+ 3.10.6 (Fedora 20).
Comment 9 Marek Kašík 2014-01-20 14:54:22 UTC
Created attachment 266743 [details] [review]
Show "Replace" button when printing to existing file

I can confirm that this bug was introduced in gtk+-3.10. Function gtk_widget_show(), which shows the button, was accidentally removed. Attached is a patch which returns the gtk_widget_show() back. The patch is intended for gtk-3-10 branch, I'll attach another one for master.

Marek
Comment 10 Marek Kašík 2014-01-20 14:56:20 UTC
Created attachment 266745 [details] [review]
Show "Replace" button when printing to existing file (master)

Attached is a patch which fixes this in master. It uses gtk_dialog_add_button() for addition of the "Replace" button instead of custom function add_custom_button_to_dialog().
Comment 11 David Ronis 2014-01-20 17:55:57 UTC
I don't know if the patch in comment 10 is the one mentioned in comment 9 for the master.  In any event,
I tried it and the patch fails in gtk+-3.11.4:

patch -p1 --dry-run < ~/0001-printing-Show-Replace-button-when-printing-3-12.patch 
patching file gtk/gtkprintunixdialog.c
Hunk #1 succeeded at 604 (offset -3 lines).
Hunk #2 FAILED at 670.
1 out of 2 hunks FAILED -- saving rejects to file gtk/gtkprintunixdialog.c.rej
Comment 12 Marek Kašík 2014-01-20 18:04:22 UTC
I've just tried "git am -3 ../0001-printing-Show-Replace-button-when-printing-3-12.patch" on git master and it was applied successfully.
Comment 13 David Ronis 2014-01-20 18:20:18 UTC
I'm not on the git/master; I'm using the 3.11.4 tarball (cf. comment 11).
Comment 14 Marek Kašík 2014-01-21 09:56:06 UTC
Created attachment 266846 [details] [review]
Show "Replace" button when printing to existing file (3.11.4)

(In reply to comment #13)
> I'm not on the git/master; I'm using the 3.11.4 tarball (cf. comment 11).

OK, here is version for 3.11.4.
Comment 15 David Ronis 2014-01-21 19:21:55 UTC
It worked.  Thanks!
Comment 16 Matthias Clasen 2014-01-25 02:08:14 UTC
Review of attachment 266846 [details] [review]:

sure
Comment 17 Marek Kašík 2014-01-27 10:14:28 UTC
Comment on attachment 266745 [details] [review]
Show "Replace" button when printing to existing file (master)

Thank you for the review. I've pushed the version for master to master.
Can I push also the version for 3.10 to 3.10?
Comment 18 Matthias Clasen 2014-01-28 02:15:59 UTC
sure, please push to 3.10 as well (sadly it just missed a release I did earlier today)
Comment 19 Marek Kašík 2014-01-28 10:42:35 UTC
Comment on attachment 266743 [details] [review]
Show "Replace" button when printing to existing file

(In reply to comment #18)
> sure, please push to 3.10 as well (sadly it just missed a release I did earlier
> today)

Thank you. I've pushed it to 3-10.
Comment 20 Marek Kašík 2014-02-21 14:10:06 UTC
*** Bug 724605 has been marked as a duplicate of this bug. ***
Comment 21 Jean Bréfort 2014-05-14 06:59:44 UTC
*** Bug 730104 has been marked as a duplicate of this bug. ***