GNOME Bugzilla – Bug 683335
Set the basename for print-to-file
Last modified: 2012-12-01 19:23:49 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".
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>
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?
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...)
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.
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.