summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-04 20:50:34 +0300
committermonsta <[email protected]>2016-01-04 20:50:34 +0300
commitf8a4152a3aa73bd36ff1359acd7f4c896891437f (patch)
tree1baeb2162be9486a297d6295b95ed857dc0d3d1e
parent073e20094ef5ca4ef88785066ae62a475df34aaa (diff)
downloadmate-panel-f8a4152a3aa73bd36ff1359acd7f4c896891437f.tar.bz2
mate-panel-f8a4152a3aa73bd36ff1359acd7f4c896891437f.tar.xz
background: group some local functions by GTK+ version
-rw-r--r--mate-panel/panel-widget.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/mate-panel/panel-widget.c b/mate-panel/panel-widget.c
index f6333479..c8e82442 100644
--- a/mate-panel/panel-widget.c
+++ b/mate-panel/panel-widget.c
@@ -1658,33 +1658,22 @@ panel_widget_set_background_default_style (GtkWidget *widget)
cairo_pattern_destroy (bg_image);
}
}
-#else
+
static void
-panel_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
+panel_widget_state_flags_changed (GtkWidget *widget, GtkStateFlags previous_state)
{
- GtkStyle *style;
- GtkStateType state;
-
- if (gtk_widget_get_realized (widget)) {
- style = gtk_widget_get_style (widget);
- state = gtk_widget_get_state (widget);
-
- panel_background_set_default_style (
- &PANEL_WIDGET (widget)->background,
- &style->bg [state],
- style->bg_pixmap [state]);
- }
+ panel_widget_set_background_default_style (widget);
}
-#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
static void
panel_widget_style_updated (GtkWidget *widget)
{
GTK_WIDGET_CLASS (panel_widget_parent_class)->style_updated (widget);
panel_widget_set_background_default_style (widget);
}
+
#else
+
static void
panel_widget_state_changed (GtkWidget *widget,
GtkStateType previous_state)
@@ -1702,13 +1691,22 @@ panel_widget_state_changed (GtkWidget *widget,
style->bg_pixmap [state]);
}
}
-#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
static void
-panel_widget_state_flags_changed (GtkWidget *widget, GtkStateFlags previous_state)
+panel_widget_style_set (GtkWidget *widget, GtkStyle *previous_style)
{
- panel_widget_set_background_default_style (widget);
+ GtkStyle *style;
+ GtkStateType state;
+
+ if (gtk_widget_get_realized (widget)) {
+ style = gtk_widget_get_style (widget);
+ state = gtk_widget_get_state (widget);
+
+ panel_background_set_default_style (
+ &PANEL_WIDGET (widget)->background,
+ &style->bg [state],
+ style->bg_pixmap [state]);
+ }
}
#endif