Commit 1944b86e authored by Germán Poo-Caamaño's avatar Germán Poo-Caamaño

document: Replace deprecated function instead of ignoring it

gdk_color_equal is simple enough to replace it with code inline
and make the function work even if it were removed later.
parent e7294eb1
......@@ -611,7 +611,6 @@ ev_annotation_get_color (EvAnnotation *annot,
*
* Deprecated: 3.6: Use ev_annotation_set_rgba() instead.
*/
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gboolean
ev_annotation_set_color (EvAnnotation *annot,
const GdkColor *color)
......@@ -622,8 +621,11 @@ ev_annotation_set_color (EvAnnotation *annot,
g_return_val_if_fail (EV_IS_ANNOTATION (annot), FALSE);
ev_annotation_get_color (annot, &annot_color);
if (color == NULL || gdk_color_equal (color, &annot_color))
return FALSE;
if (color == NULL ||
((color->red == annot_color.red) &&
(color->green == annot_color.green) &&
(color->blue == annot_color.blue)))
return FALSE;
rgba.red = color->red / 65535.;
rgba.green = color->green / 65535.;
......@@ -634,7 +636,6 @@ ev_annotation_set_color (EvAnnotation *annot,
return TRUE;
}
G_GNUC_END_IGNORE_DEPRECATIONS
/**
* ev_annotation_get_rgba:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment