From 17fc492a17e8f5317d7438c771ac9c95ce1e0a04 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Fri, 29 Nov 2013 14:36:23 +0100 Subject: Panel background improvements for GTK3 --- mate-panel/panel.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mate-panel/panel.c') diff --git a/mate-panel/panel.c b/mate-panel/panel.c index 8ac44a88..666a62b7 100644 --- a/mate-panel/panel.c +++ b/mate-panel/panel.c @@ -433,7 +433,11 @@ static gboolean set_background_color (PanelToplevel *toplevel, guint16 *dropped) { +#if GTK_CHECK_VERSION (3, 0, 0) + GdkRGBA color; +#else PanelColor color; +#endif if (!dropped) return FALSE; @@ -442,10 +446,17 @@ set_background_color (PanelToplevel *toplevel, ! panel_profile_background_key_is_writable (toplevel, "type")) return FALSE; +#if GTK_CHECK_VERSION (3, 0, 0) + color.red = dropped [0]; + color.green = dropped [1]; + color.blue = dropped [2]; + color.alpha = 1.; +#else color.gdk.red = dropped [0]; color.gdk.green = dropped [1]; color.gdk.blue = dropped [2]; color.alpha = 65535; +#endif panel_profile_set_background_color (toplevel, &color); panel_profile_set_background_type (toplevel, PANEL_BACK_COLOR); -- cgit v1.2.1