diff options
author | Wolfgang Ulbrich <chat-to-me@raveit.de> | 2016-02-11 08:00:01 +0100 |
---|---|---|
committer | Wolfgang Ulbrich <chat-to-me@raveit.de> | 2016-02-12 07:04:31 +0100 |
commit | aed7b90e3db34bb57eb3abfc28b15eed13d8655f (patch) | |
tree | 0eb1dd1708eae4d242d166799467d806ca81a76e | |
parent | 01f743e5ac7c95b4fc80cd11d73657dc3176eaf0 (diff) | |
download | mate-panel-aed7b90e3db34bb57eb3abfc28b15eed13d8655f.tar.bz2 mate-panel-aed7b90e3db34bb57eb3abfc28b15eed13d8655f.tar.xz |
GTK+-3.20 showdesktop: don't use deprecated style properties
taken from:
https://git.gnome.org/browse/gnome-panel/commit/?id=4139922
-rw-r--r-- | applets/wncklet/showdesktop.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |