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

The API that is currently used is deprecated since 10.6.
This commit is contained in:
Kristian Rietveld 2016-05-06 20:45:59 +02:00
parent 1bfd57b99c
commit 48721b5152
1 changed files with 6 additions and 5 deletions

View File

@ -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