[gedit] Print to file: fix default output filename



commit 22af8b75e74c21c70ff5b27fbb02a248bc50ae18
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 0581f5e..babe9f8 100644
--- a/gedit/gedit-tab.c
+++ b/gedit/gedit-tab.c
@@ -2361,6 +2361,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]