[gimp] print: don't store image specific settings globally



commit 9464d303a999aea805370234ef5814df6062fb75
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.

 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 29f59f6..f39ec2d 100644
--- a/plug-ins/print/print-settings.c
+++ b/plug-ins/print/print-settings.c
@@ -106,6 +106,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]