[evince/gnome-3-16] shell: Never save n-copies in the print-settings file



commit d8d6c37e0fffe88848fcf7b89afcdd6f111b7fb8
Author: José Aliste <jaliste src gnome org>
Date:   Tue Apr 28 00:07:54 2015 -0300

    shell: Never save n-copies in the print-settings file
    
    By default gtk_print_settings_to_key_file save all settings. When fixing
    https://bugzilla.gnome.org/show_bug.cgi?id=696203 we re-introduced
    https://bugzilla.gnome.org/show_bug.cgi?id=488806 for the number of copies.
    This happens because the code that saves the document print settings in the evince
    metadata deletes the document print settings from the key file. Thus,
    the fix for bug #696203 is not stricty correct because we still
    need to delete n-copies from the key_file. This patch fixes that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748549

 shell/ev-window.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 7092d85..cc61dfc 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3080,6 +3080,9 @@ ev_window_save_print_settings (EvWindow         *window,
        key_file = get_print_settings_file ();
        gtk_print_settings_to_key_file (print_settings, key_file, EV_PRINT_SETTINGS_GROUP);
 
+       /* Always Remove n_copies from global settings */
+       g_key_file_remove_key (key_file, EV_PRINT_SETTINGS_GROUP, GTK_PRINT_SETTINGS_N_COPIES, NULL);
+
        /* Save print settings that are specific to the document */
        for (i = 0; i < G_N_ELEMENTS (document_print_settings); i++) {
                /* Remove it from global settings */


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