From 5e8cb5a359db432722e0928d15a45e2f1b007dd9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Aliste?= <jaliste@src.gnome.org>
Date: Tue, 28 Apr 2015 00:07:54 -0300
Subject: 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 file changed, 3 insertions(+)
diff --git a/shell/ev-window.c b/shell/ev-window.c
index f9802ae..ea61de7 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3060,6 +3060,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 */
--
cgit v0.12