summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-01-21 11:33:09 +0300
committermonsta <[email protected]>2016-01-21 11:33:09 +0300
commit20a203e9eb09e3e8410e1043f245052d24dd5b93 (patch)
tree1e9ad590dcaedd1c87541ca3624bdc118f4311a3
parent73e3b4764a37a280998c136a6900842181b326fd (diff)
downloadmate-netbook-20a203e9eb09e3e8410e1043f245052d24dd5b93.tar.bz2
mate-netbook-20a203e9eb09e3e8410e1043f245052d24dd5b93.tar.xz
window picker: less #if's
-rw-r--r--mate-window-picker-applet/task-title.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/mate-window-picker-applet/task-title.c b/mate-window-picker-applet/task-title.c
index 24dced9..c423dc2 100644
--- a/mate-window-picker-applet/task-title.c
+++ b/mate-window-picker-applet/task-title.c
@@ -379,14 +379,10 @@ on_button_release (GtkWidget *title, GdkEventButton *event)
}
-static gboolean
#if GTK_CHECK_VERSION (3, 0, 0)
+static gboolean
on_draw (GtkWidget *w, cairo_t *cr)
-#else
-on_expose (GtkWidget *w, GdkEventExpose *event)
-#endif
{
-#if GTK_CHECK_VERSION (3, 0, 0)
if (gtk_widget_get_state_flags (w) == GTK_STATE_FLAG_ACTIVE) {
GtkStyleContext *context = gtk_widget_get_style_context (w);
gtk_render_frame (context,
@@ -395,7 +391,16 @@ on_expose (GtkWidget *w, GdkEventExpose *event)
gtk_widget_get_allocated_width (w),
gtk_widget_get_allocated_height (w));
}
+
+ gtk_container_propagate_draw (GTK_CONTAINER (w),
+ gtk_bin_get_child (GTK_BIN (w)),
+ cr);
+ return TRUE;
+}
#else
+static gboolean
+on_expose (GtkWidget *w, GdkEventExpose *event)
+{
if (w->state == GTK_STATE_ACTIVE) {
gtk_paint_box (w->style, w->window,
w->state, GTK_SHADOW_NONE,
@@ -403,19 +408,13 @@ on_expose (GtkWidget *w, GdkEventExpose *event)
w->allocation.x, w->allocation.y,
w->allocation.width, w->allocation.height);
}
-#endif
-
-#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_container_propagate_draw (GTK_CONTAINER (w),
- gtk_bin_get_child (GTK_BIN (w)),
- cr);
-#else
+
gtk_container_propagate_expose (GTK_CONTAINER (w),
gtk_bin_get_child (GTK_BIN (w)),
event);
-#endif
return TRUE;
}
+#endif
/* GObject stuff */
static void