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 683335 - Set the basename for print-to-file
Set the basename for print-to-file
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
3.5.x
Other All
: Normal normal
: GNOME3.8
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-09-04 14:59 UTC by Federico Mena Quintero
Modified: 2012-12-01 19:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bgo#683335 - Set the basename for print-to-file (1.74 KB, patch)
2012-09-04 15:01 UTC, Federico Mena Quintero
reviewed Details | Review

Description Federico Mena Quintero 2012-09-04 14:59:04 UTC
See https://live.gnome.org/GnomeGoals/PrintToFile for where this comes from.  We have to set a recommended basename for the print-to-file command, so that GTK+ can use something better than "output.pdf".
Comment 1 Federico Mena Quintero 2012-09-04 15:01:05 UTC
Created attachment 223433 [details] [review]
bgo#683335 - Set the basename for print-to-file

Per https://live.gnome.org/GnomeGoals/PrintToFile , GTK+ 3.6 lets the application set a filename
for the print-to-file command so that GTK+ can present a better default than just 'output.pdf'.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Comment 2 Claudio Saavedra 2012-09-04 17:25:31 UTC
Review of attachment 223433 [details] [review]:

::: src/eog-window.c
@@ +2185,3 @@
+	else
+		basename = NULL;
+

EogImage has eog_image_get_caption(). Perhaps we should take the chance to change it to use g_file_info_get_display_name() and kill two birds with the same stone?
Comment 3 Claudio Saavedra 2012-09-04 17:26:16 UTC
Review of attachment 223433 [details] [review]:

::: src/eog-window.c
@@ +2185,3 @@
+	else
+		basename = NULL;
+

EogImage has eog_image_get_caption(). Perhaps we should take the chance to change it to use g_file_info_get_display_name() and kill two birds with the same stone?
Comment 4 Claudio Saavedra 2012-09-04 17:26:17 UTC
Review of attachment 223433 [details] [review]:

::: src/eog-window.c
@@ +2185,3 @@
+	else
+		basename = NULL;
+

EogImage has eog_image_get_caption(). Perhaps we should take the chance to change it to use g_file_info_get_display_name() and kill two birds with the same stone?
Comment 5 Federico Mena Quintero 2012-09-18 14:41:19 UTC
Sure - feel free to tweak it any way you want :)  I just wanted to get this started for the GnomeGoal.

(Gedit computes the display basename once and keeps it around, and then it can build other strings from that...)
Comment 6 Felix Riemann 2012-11-18 18:13:21 UTC
There's actually even more to do here. We also have to make sure that we don't save/restore the filename from printsettings or it'll work only once.
Comment 7 Felix Riemann 2012-12-01 19:23:49 UTC
And this has landed!

commit 252747ea73197ff0c9e52980907dd7bdd79951d7
Author: Felix Riemann <>
Date:   Sat Dec 1 20:21:42 2012 +0100

    Simplify setting print-to-file basename
    
    The logic that was used to determine the basename was
    moved to eog_image_get_caption().

commit e7bf0daef3c73bedcce3b59f59bcb8886003fed3
Author: Felix Riemann <>
Date:   Sat Dec 1 20:15:56 2012 +0100

    Make eog_image_get_caption() use GFileInfo
    
    GFileInfo has everything needed to get a UTF8-formatted filename
    that can be displayed in the UI.

commit c3b0e67b9ee1d7dc1d49be93a25bc4e50a8fafbb
Author: Felix Riemann <>
Date:   Sat Dec 1 20:00:36 2012 +0100

    Don't save the print-to-file output URI.
    
    This would break the print-to-file basename feature.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683335

commit cb4907899494f083facbca5bb7c86aa2cc0f88ab
Author: Felix Riemann <>
Date:   Sat Dec 1 19:59:39 2012 +0100

    Raise GTK+ dependency for print-to-file basename
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683335

commit b60f391c595936088df8c9fcdcb3bf1ac91880a1
Author: Federico Mena Quintero <>
Date:   Tue Sep 4 09:59:45 2012 -0500

    bgo#683335 - Set the basename for print-to-file
    
    Per https://live.gnome.org/GnomeGoals/PrintToFile , GTK+ 3.6 lets the application set a
    for the print-to-file command so that GTK+ can present a better default than just 'outp
    
    Signed-off-by: Federico Mena Quintero <>
---
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.