[gimp] libgimpwidgets: update OS X code to get display profile to new API



commit 48721b515216f02ddf4c8ecbe001b7d218396932
Author: Kristian Rietveld <kris loopnest org>
Date:   Fri May 6 20:45:59 2016 +0200

    libgimpwidgets: update OS X code to get display profile to new API
    
    The API that is currently used is deprecated since 10.6.

 libgimpwidgets/gimpwidgetsutils.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/libgimpwidgets/gimpwidgetsutils.c b/libgimpwidgets/gimpwidgetsutils.c
index 690b06f..6b25349 100644
--- a/libgimpwidgets/gimpwidgetsutils.c
+++ b/libgimpwidgets/gimpwidgetsutils.c
@@ -400,16 +400,15 @@ gimp_widget_get_color_profile (GtkWidget *widget)
   }
 #elif defined GDK_WINDOWING_QUARTZ
   {
-    CMProfileRef prof = NULL;
+    CGColorSpaceRef space = NULL;
 
-    CMGetProfileByAVID (monitor, &prof);
+    space = CGDisplayCopyColorSpace (monitor);
 
-    if (prof)
+    if (space)
       {
         CFDataRef data;
 
-        data = CMProfileCopyICCData (NULL, prof);
-        CMCloseProfile (prof);
+        data = CGColorSpaceCopyICCProfile (space);
 
         if (data)
           {
@@ -429,6 +428,8 @@ gimp_widget_get_color_profile (GtkWidget *widget)
             g_free (buffer);
             CFRelease (data);
           }
+
+        CFRelease (space);
       }
   }
 #elif defined G_OS_WIN32


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