diff options
author | monsta <[email protected]> | 2016-01-04 21:08:32 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-01-04 21:08:32 +0300 |
commit | 4c44f5043c32cfc9025e1439fd2efd59c92716cc (patch) | |
tree | 537639eaa0d809cedda22ba4b9e685d0118af9f5 | |
parent | c5fbc1a292d3b865eea9f577f848b2cb13454bc5 (diff) | |
download | mate-panel-4c44f5043c32cfc9025e1439fd2efd59c92716cc.tar.bz2 mate-panel-4c44f5043c32cfc9025e1439fd2efd59c92716cc.tar.xz |
background: group some more local functions, drop some #if's
-rw-r--r-- | mate-panel/panel-background.c | 36 |
1 files 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, |