summaryrefslogtreecommitdiff
path: root/libdocument/ev-annotation.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2019-07-29 15:54:38 +0200
committerraveit65 <[email protected]>2019-07-29 15:54:38 +0200
commitac5503c7bb7afe9565eb700454ab4ab0b2671322 (patch)
tree10c8e4d252c049c76918ecccaad4b63fd0978715 /libdocument/ev-annotation.c
parent66dc31ec6b9bc20d37678053376ac3811ea6c2c2 (diff)
downloadatril-ac5503c7bb7afe9565eb700454ab4ab0b2671322.tar.bz2
atril-ac5503c7bb7afe9565eb700454ab4ab0b2671322.tar.xz
document: Replace deprecated gdk_color_equal
gdk_color_equal is simple enough to replace it with code inline taken from: https://gitlab.gnome.org/GNOME/evince/commit/1944b86
Diffstat (limited to 'libdocument/ev-annotation.c')
-rw-r--r--libdocument/ev-annotation.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libdocument/ev-annotation.c b/libdocument/ev-annotation.c
index 9e918b2a..200933f9 100644
--- a/libdocument/ev-annotation.c
+++ b/libdocument/ev-annotation.c
@@ -565,8 +565,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.;