summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-05 20:25:05 +0300
committermonsta <[email protected]>2016-01-05 20:25:05 +0300
commitc0ee3dae38adf305b4e31a0c8c2d1da532f1a4e5 (patch)
tree166526e17aa4b22d7197ad596c09b2f6f7306216
parent79c1b475c32aa7d243199176df3556ea25b51da9 (diff)
downloadmate-panel-c0ee3dae38adf305b4e31a0c8c2d1da532f1a4e5.tar.bz2
mate-panel-c0ee3dae38adf305b4e31a0c8c2d1da532f1a4e5.tar.xz
properties dialog: use convenience function to compare colors
-rw-r--r--mate-panel/panel-properties-dialog.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c
index 8e959038..d674f7b4 100644
--- a/mate-panel/panel-properties-dialog.c
+++ b/mate-panel/panel-properties-dialog.c
@@ -726,9 +726,7 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog,
mate_color_button_get_rgba (MATE_COLOR_BUTTON (dialog->color_button),
&old_color);
- if (old_color.red != new_color.red ||
- old_color.green != new_color.green ||
- old_color.blue != new_color.blue)
+ if (!gdk_rgba_equal (&old_color, &new_color))
mate_color_button_set_rgba (MATE_COLOR_BUTTON (dialog->color_button),
&new_color);
#else
@@ -741,9 +739,7 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog,
mate_color_button_get_color (MATE_COLOR_BUTTON (dialog->color_button),
&old_color);
- if (old_color.red != new_color.red ||
- old_color.green != new_color.green ||
- old_color.blue != new_color.blue)
+ if (!gdk_color_equal (&old_color, &new_color))
mate_color_button_set_color (MATE_COLOR_BUTTON (dialog->color_button),
&new_color);
#endif