[gimp/metadata-browser] app: make sure explicitly saved color tool settings don't end up in "recent"



commit 94fd944ad4cb2ee04a960a26bef8325248ff6bb8
Author: Michael Natterer <mitch gimp org>
Date:   Mon Apr 2 11:50:47 2012 +0200

    app: make sure explicitly saved color tool settings don't end up in "recent"
    
    reset the "time" property after applying the stored setting, otherwise
    explicitly storing the config as setting will also copy the time, and
    the stored object will be considered to be among the automatically
    stored recently used settings

 app/widgets/gimpsettingsbox.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpsettingsbox.c b/app/widgets/gimpsettingsbox.c
index ad26477..99577e7 100644
--- a/app/widgets/gimpsettingsbox.c
+++ b/app/widgets/gimpsettingsbox.c
@@ -583,6 +583,17 @@ gimp_settings_box_setting_selected (GimpContainerView *view,
       gimp_config_copy (GIMP_CONFIG (object),
                         GIMP_CONFIG (private->config), 0);
 
+      /*  reset the "time" property, otherwise explicitly storing the
+       *  config as setting will also copy the time, and the stored
+       *  object will be considered to be among the automatically
+       *  stored recently used settings
+       */
+      if (g_object_class_find_property (G_OBJECT_GET_CLASS (private->config),
+                                        "time"))
+        {
+          g_object_set (private->config, "time", 0, NULL);
+        }
+
       gimp_container_view_select_item (view, NULL);
     }
 }



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