[gimp] app: show the image's "is color managed" state in the window title string



commit e69bb901973af552dbe33fc7dc455dd81804d0d3
Author: Michael Natterer <mitch gimp org>
Date:   Sun May 8 19:25:46 2016 +0200

    app: show the image's "is color managed" state in the window title string
    
    Instead of the profile name, print "(not color managed)".

 app/display/gimpdisplayshell-title.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-title.c b/app/display/gimpdisplayshell-title.c
index aed2e15..0191e9e 100644
--- a/app/display/gimpdisplayshell-title.c
+++ b/app/display/gimpdisplayshell-title.c
@@ -37,6 +37,7 @@
 #include "core/gimpcontainer.h"
 #include "core/gimpdrawable.h"
 #include "core/gimpimage.h"
+#include "core/gimpimage-color-profile.h"
 #include "core/gimpitem.h"
 
 #include "gimpdisplay.h"
@@ -456,16 +457,21 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
               break;
 
             case 'o': /* image's color profile name */
-              {
-                GimpColorManaged *managed = GIMP_COLOR_MANAGED (image);
-                GimpColorProfile *profile;
+              if (gimp_image_get_is_color_managed (image))
+                {
+                  GimpColorManaged *managed = GIMP_COLOR_MANAGED (image);
+                  GimpColorProfile *profile;
 
-                profile = gimp_color_managed_get_color_profile (managed);
+                  profile = gimp_color_managed_get_color_profile (managed);
 
-                if (profile)
                   i += print (title, title_len, i, "%s",
                               gimp_color_profile_get_label (profile));
-              }
+                }
+              else
+                {
+                  i += print (title, title_len, i, "%s",
+                              _("not color managed"));
+                }
               break;
 
             case 'e': /* display's offsets in pixels */


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