Skip to content

Commit

Permalink
shell: Never save n-copies in the print-settings file
Browse files Browse the repository at this point in the history
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
  • Loading branch information
José Aliste committed Apr 28, 2015
1 parent b2e9dca commit 5e8cb5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shell/ev-window.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 5e8cb5a

Please sign in to comment.