[gimp/gimp-2-6] print: don't store image specific settings globally



commit de42f754cbdfe4e7e0fce57a3ade5e264bcc28eb
Author: Sven Neumann <sven gimp org>
Date:   Tue Aug 18 22:18:59 2009 +0200

    print: don't store image specific settings globally
    
    It doesn't make sense to store image-specific settings such as resolution
    and offsets in the global print-settings file. Only store them in the
    image parasite, but remove them before saving the print-settings file.
    (cherry picked from commit 9464d303a999aea805370234ef5814df6062fb75)

 plug-ins/print/print-settings.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/print/print-settings.c b/plug-ins/print/print-settings.c
index 83c9af1..6a3da0b 100644
--- a/plug-ins/print/print-settings.c
+++ b/plug-ins/print/print-settings.c
@@ -105,6 +105,12 @@ print_settings_save (PrintData *data)
   /* 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, "image-setup", "x-resolution", NULL);
+  g_key_file_remove_key (key_file, "image-setup", "y-resolution", NULL);
+  g_key_file_remove_key (key_file, "image-setup", "x-offset", NULL);
+  g_key_file_remove_key (key_file, "image-setup", "y-offset", NULL);
+
   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);



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