diff options
author | monsta <[email protected]> | 2017-01-30 17:44:36 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-01-31 13:50:05 +0300 |
commit | f0c5d5c5511b86b9468dad0ad8bd22663d133c04 (patch) | |
tree | 10bcb0ce1c31dc39b1fe248d97a67ccc87178cf9 | |
parent | 39e9febe6b9380fabce107f2d954d40d06a99b8d (diff) | |
download | mate-panel-f0c5d5c5511b86b9468dad0ad8bd22663d133c04.tar.bz2 mate-panel-f0c5d5c5511b86b9468dad0ad8bd22663d133c04.tar.xz |
clock: fix remaining deprecation for GTK+ >= 3.20
-rw-r--r-- | applets/clock/clock.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/applets/clock/clock.c b/applets/clock/clock.c index ae45886c..e2fa6206 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -405,8 +405,10 @@ calculate_minimum_height (GtkWidget *widget, #endif PangoContext *pango_context; PangoFontMetrics *metrics; +#if !GTK_CHECK_VERSION (3, 20, 0) int focus_width = 0; int focus_pad = 0; +#endif int ascent; int descent; int thickness; @@ -435,10 +437,12 @@ calculate_minimum_height (GtkWidget *widget, #if GTK_CHECK_VERSION (3, 0, 0) gtk_style_context_get_padding (style_context, state, &padding); +#if !GTK_CHECK_VERSION (3, 20, 0) gtk_style_context_get_style (style_context, "focus-line-width", &focus_width, "focus-padding", &focus_pad, NULL); +#endif #else gtk_widget_style_get (widget, "focus-line-width", &focus_width, @@ -461,7 +465,11 @@ calculate_minimum_height (GtkWidget *widget, #endif } +#if GTK_CHECK_VERSION (3, 20, 0) + return PANGO_PIXELS (ascent + descent) + thickness; +#else return PANGO_PIXELS (ascent + descent) + 2 * (focus_width + focus_pad) + thickness; +#endif } static gboolean |