[gimp] app: make sure fg, bg, brush, pattern etc. changes don't write gimprc



commit c3510405c4949b96b3b31dcdd96ec80bec936f2f
Author: Michael Natterer <mitch gimp org>
Date:   Tue Dec 6 19:24:11 2016 +0100

    app: make sure fg, bg, brush, pattern etc. changes don't write gimprc
    
    gimp_dialog_config_fill,stroke_options_notify(): ignore notifications
    on the fill and stroke option's parent class properties, they are not
    serialized and completely irrelevent here.

 app/config/gimpdialogconfig.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/app/config/gimpdialogconfig.c b/app/config/gimpdialogconfig.c
index ee437f8..7ab14d1 100644
--- a/app/config/gimpdialogconfig.c
+++ b/app/config/gimpdialogconfig.c
@@ -919,7 +919,9 @@ gimp_dialog_config_fill_options_notify (GObject    *object,
                                         GParamSpec *pspec,
                                         gpointer    data)
 {
-  g_object_notify (G_OBJECT (data), "fill-options");
+  /*  ignore notifications on parent class properties such as fg/bg  */
+  if (pspec->owner_type == G_TYPE_FROM_INSTANCE (object))
+    g_object_notify (G_OBJECT (data), "fill-options");
 }
 
 static void
@@ -927,5 +929,7 @@ gimp_dialog_config_stroke_options_notify (GObject    *object,
                                           GParamSpec *pspec,
                                           gpointer    data)
 {
-  g_object_notify (G_OBJECT (data), "stroke-options");
+  /*  see above  */
+  if (pspec->owner_type == G_TYPE_FROM_INSTANCE (object))
+    g_object_notify (G_OBJECT (data), "stroke-options");
 }


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