[gimp] app: make display color management work with the transform cache



commit 710ba9bef3c682cb21175c00cb9ac23361f90d7f
Author: Michael Natterer <mitch gimp org>
Date:   Mon May 30 01:16:07 2016 +0200

    app: make display color management work with the transform cache
    
    Need to connect_after() to the shell's GimpColorConfig "notify" so the
    profile transform cache in gimp_widget_get_color_transform() is
    already invalidated when we call gimp_color_managed_profile_changed()
    in the shell's notify callback.
    
    This is a hack. Actually the shell should create its transform only on
    demand, and a config change should simply get rid of the previous
    transform, just as all other widgets are doing it.

 app/display/gimpdisplayshell-profile.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-profile.c b/app/display/gimpdisplayshell-profile.c
index 0187229..8058fb1 100644
--- a/app/display/gimpdisplayshell-profile.c
+++ b/app/display/gimpdisplayshell-profile.c
@@ -65,9 +65,12 @@ gimp_display_shell_profile_init (GimpDisplayShell *shell)
 
   shell->color_config = gimp_config_duplicate (GIMP_CONFIG (color_config));
 
-  g_signal_connect (shell->color_config, "notify",
-                    G_CALLBACK (gimp_display_shell_color_config_notify),
-                    shell);
+  /* use after so we are called after the profile cache is invalidated
+   * in gimp_widget_get_color_transform()
+   */
+  g_signal_connect_after (shell->color_config, "notify",
+                          G_CALLBACK (gimp_display_shell_color_config_notify),
+                          shell);
 }
 
 void


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