mirror of https://github.com/GNOME/gimp.git
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:
parent
1bfd57b99c
commit
48721b5152
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue