[gedit/gnome-3-10] Print to file: fix default output filename



commit 5f799b7a61304a57efc7457ef88e7467210d3bfd
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Nov 3 20:29:46 2013 +0100

    Print to file: fix default output filename
    
    In ~/.config/gedit/gedit-print-settings, the URI is saved and loaded the
    next time. Since the URI has a higher priority than the BASENAME, the
    basename was not taken into account.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707190

 gedit/gedit-tab.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-tab.c b/gedit/gedit-tab.c
index 2dce78c..5522f35 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2489,6 +2489,11 @@ get_print_settings (GeditTab *tab)
                settings = gtk_print_settings_copy (GTK_PRINT_SETTINGS (data));
        }
 
+       /* Be sure the OUTPUT_URI is unset, because otherwise the
+        * OUTPUT_BASENAME is not taken into account.
+        */
+       gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_URI, NULL);
+
        name = gedit_document_get_short_name_for_display (doc);
        gtk_print_settings_set (settings, GTK_PRINT_SETTINGS_OUTPUT_BASENAME, name);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]