[gimp/gimp-2-6] Bug 584345 – when printing, the number of copies should be reset to 1



commit 3f21c948c9672ea22b92d2d546132f2d57fd8484
Author: Sven Neumann <sven gimp org>
Date:   Mon Jun 1 20:02:19 2009 +0200

    Bug 584345 â?? when printing, the number of copies should be reset to 1
                 at each new GIMP session
    
    Do not store the number of copies in the print-settings resource file,
    but keep it in the print-settings that are attached to the image.
    (cherry picked from commit af965d82ddfa3b5af0a786ab7e0a2a15df40c49b)
---
 plug-ins/print/print-settings.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/plug-ins/print/print-settings.c b/plug-ins/print/print-settings.c
index 723aebd..83c9af1 100644
--- a/plug-ins/print/print-settings.c
+++ b/plug-ins/print/print-settings.c
@@ -79,8 +79,6 @@ print_settings_save (PrintData *data)
 {
   GKeyFile *key_file = print_settings_key_file_from_settings (data);
 
-  print_utils_key_file_save_as_rcfile (key_file, PRINT_SETTINGS_NAME);
-
   /* image setup */
   if (gimp_image_is_valid (data->image_id))
     {
@@ -104,6 +102,13 @@ print_settings_save (PrintData *data)
                                              PRINT_SETTINGS_NAME);
     }
 
+  /* some settings shouldn't be made persistent on a global level,
+   * so they are only stored in the image, not in the rcfile
+   */
+  g_key_file_remove_key (key_file, PRINT_SETTINGS_NAME, "n-copies", NULL);
+
+  print_utils_key_file_save_as_rcfile (key_file, PRINT_SETTINGS_NAME);
+
   g_key_file_free (key_file);
 }
 



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