From 4c44f5043c32cfc9025e1439fd2efd59c92716cc Mon Sep 17 00:00:00 2001 From: monsta Date: Mon, 4 Jan 2016 21:08:32 +0300 Subject: background: group some more local functions, drop some #if's --- mate-panel/panel-background.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/mate-panel/panel-background.c b/mate-panel/panel-background.c index e575e61f..d523ab25 100644 --- a/mate-panel/panel-background.c +++ b/mate-panel/panel-background.c @@ -1410,9 +1410,23 @@ panel_background_set_no_background_on_widget (PanelBackground *background, gtk_widget_modify_style (widget, rc_style); g_object_unref (rc_style); } -#endif -#if !GTK_CHECK_VERSION (3, 0, 0) +static void +panel_background_set_color_background_on_widget (PanelBackground *background, + GtkWidget *widget) +{ + const PanelColor *color; + + color = panel_background_get_color (background); + if (color->alpha != 0xffff) { + panel_background_set_image_background_on_widget (background, + widget); + return; + } + + gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color->gdk); +} + static void panel_background_set_image_background_on_widget (PanelBackground *background, @@ -1457,24 +1471,6 @@ panel_background_set_image_background_on_widget (PanelBackground *background, g_object_unref (pixmap); } -#endif - -#if !GTK_CHECK_VERSION (3, 0, 0) -static void -panel_background_set_color_background_on_widget (PanelBackground *background, - GtkWidget *widget) -{ - const PanelColor *color; - - color = panel_background_get_color (background); - if (color->alpha != 0xffff) { - panel_background_set_image_background_on_widget (background, - widget); - return; - } - - gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, &color->gdk); -} void panel_background_change_background_on_widget (PanelBackground *background, -- cgit v1.2.1