summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-05 20:21:57 +0300
committermonsta <[email protected]>2016-01-05 20:21:57 +0300
commit79c1b475c32aa7d243199176df3556ea25b51da9 (patch)
tree7a1b438ceb09ffdafe2d0600bd48bee6812cc871
parent873cedbc95777e7b74960a66883c48945fcecd4c (diff)
downloadmate-panel-79c1b475c32aa7d243199176df3556ea25b51da9.tar.bz2
mate-panel-79c1b475c32aa7d243199176df3556ea25b51da9.tar.xz
properties dialog: less #if's
-rw-r--r--mate-panel/panel-properties-dialog.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/mate-panel/panel-properties-dialog.c b/mate-panel/panel-properties-dialog.c
index c1f5c76e..8e959038 100644
--- a/mate-panel/panel-properties-dialog.c
+++ b/mate-panel/panel-properties-dialog.c
@@ -719,34 +719,34 @@ panel_properties_dialog_update_background_color (PanelPropertiesDialog *dialog,
#if GTK_CHECK_VERSION (3, 0, 0)
GdkRGBA new_color;
GdkRGBA old_color;
+
+ if (!gdk_rgba_parse (&new_color, str_color))
+ return;
+
+ 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)
+ mate_color_button_set_rgba (MATE_COLOR_BUTTON (dialog->color_button),
+ &new_color);
#else
GdkColor new_color = { 0, };
GdkColor old_color;
-#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
- if (!gdk_rgba_parse (&new_color, str_color))
-#else
if (!gdk_color_parse (str_color, &new_color))
-#endif
return;
-#if GTK_CHECK_VERSION (3, 0, 0)
- mate_color_button_get_rgba (MATE_COLOR_BUTTON (dialog->color_button),
-#else
mate_color_button_get_color (MATE_COLOR_BUTTON (dialog->color_button),
-#endif
&old_color);
if (old_color.red != new_color.red ||
old_color.green != new_color.green ||
old_color.blue != new_color.blue)
-#if GTK_CHECK_VERSION (3, 0, 0)
- mate_color_button_set_rgba (MATE_COLOR_BUTTON (dialog->color_button),
-#else
mate_color_button_set_color (MATE_COLOR_BUTTON (dialog->color_button),
-#endif
&new_color);
+#endif
}
#if !GTK_CHECK_VERSION(3, 0, 0)