Blame SOURCES/evince-3.14.2-printing-dont-save-number-of-copies.patch

d6c6b3
From 5e8cb5a359db432722e0928d15a45e2f1b007dd9 Mon Sep 17 00:00:00 2001
d6c6b3
From: =?UTF-8?q?Jos=C3=A9=20Aliste?= <jaliste@src.gnome.org>
d6c6b3
Date: Tue, 28 Apr 2015 00:07:54 -0300
d6c6b3
Subject: shell: Never save n-copies in the print-settings file
d6c6b3
d6c6b3
By default gtk_print_settings_to_key_file save all settings. When fixing
d6c6b3
https://bugzilla.gnome.org/show_bug.cgi?id=696203 we re-introduced
d6c6b3
https://bugzilla.gnome.org/show_bug.cgi?id=488806 for the number of copies.
d6c6b3
This happens because the code that saves the document print settings in the evince
d6c6b3
metadata deletes the document print settings from the key file. Thus,
d6c6b3
the fix for bug #696203 is not stricty correct because we still
d6c6b3
need to delete n-copies from the key_file. This patch fixes that.
d6c6b3
d6c6b3
https://bugzilla.gnome.org/show_bug.cgi?id=748549
d6c6b3
---
d6c6b3
 shell/ev-window.c | 3 +++
d6c6b3
 1 file changed, 3 insertions(+)
d6c6b3
d6c6b3
diff --git a/shell/ev-window.c b/shell/ev-window.c
d6c6b3
index f9802ae..ea61de7 100644
d6c6b3
--- a/shell/ev-window.c
d6c6b3
+++ b/shell/ev-window.c
d6c6b3
@@ -3060,6 +3060,9 @@ ev_window_save_print_settings (EvWindow         *window,
d6c6b3
 	key_file = get_print_settings_file ();
d6c6b3
 	gtk_print_settings_to_key_file (print_settings, key_file, EV_PRINT_SETTINGS_GROUP);
d6c6b3
 
d6c6b3
+	/* Always Remove n_copies from global settings */
d6c6b3
+	g_key_file_remove_key (key_file, EV_PRINT_SETTINGS_GROUP, GTK_PRINT_SETTINGS_N_COPIES, NULL);
d6c6b3
+
d6c6b3
 	/* Save print settings that are specific to the document */
d6c6b3
 	for (i = 0; i < G_N_ELEMENTS (document_print_settings); i++) {
d6c6b3
 		/* Remove it from global settings */
d6c6b3
-- 
d6c6b3
cgit v0.12
d6c6b3