From aed7b90e3db34bb57eb3abfc28b15eed13d8655f Mon Sep 17 00:00:00 2001 From: Wolfgang Ulbrich Date: Thu, 11 Feb 2016 08:00:01 +0100 Subject: GTK+-3.20 showdesktop: don't use deprecated style properties taken from: https://git.gnome.org/browse/gnome-panel/commit/?id=4139922 --- applets/wncklet/showdesktop.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/applets/wncklet/showdesktop.c b/applets/wncklet/showdesktop.c index 0c420c15..8ef011c0 100644 --- a/applets/wncklet/showdesktop.c +++ b/applets/wncklet/showdesktop.c @@ -144,8 +144,10 @@ static void update_icon(ShowDesktopData* sdd) GdkPixbuf* scaled; int icon_size; GError* error; +#if !GTK_CHECK_VERSION (3, 19, 0) int focus_width = 0; int focus_pad = 0; +#endif int thickness = 0; if (!sdd->icon_theme) @@ -155,10 +157,12 @@ static void update_icon(ShowDesktopData* sdd) state = gtk_widget_get_state_flags (sdd->button); context = gtk_widget_get_style_context (sdd->button); gtk_style_context_get_padding (context, state, &padding); +#if !GTK_CHECK_VERSION (3, 19, 0) gtk_style_context_get_style (context, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL); +#endif switch (sdd->orient) { case GTK_ORIENTATION_HORIZONTAL: @@ -168,8 +172,11 @@ static void update_icon(ShowDesktopData* sdd) thickness = padding.left + padding.right; break; } - +#if GTK_CHECK_VERSION (3, 19, 0) + icon_size = sdd->size - thickness; +#else icon_size = sdd->size - 2 * (focus_width + focus_pad) - thickness; +#endif #else gtk_widget_style_get (sdd->button, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL); -- cgit v1.2.1