From c0ee3dae38adf305b4e31a0c8c2d1da532f1a4e5 Mon Sep 17 00:00:00 2001 From: monsta Date: Tue, 5 Jan 2016 20:25:05 +0300 Subject: properties dialog: use convenience function to compare colors --- mate-panel/panel-properties-dialog.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'mate-panel') 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 -- cgit v1.2.1