diff options
author | monsta <[email protected]> | 2017-01-30 17:44:36 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2017-01-30 17:44:36 +0300 |
commit | 88cd57f64f498be7223847540d3bc84e7ac5cd99 (patch) | |
tree | 29d719dbba94eecf9dbe080209cdc02655e2ddc1 /applets | |
parent | 3edb41ee3e632cec5fcda70d34f4a613e24adf52 (diff) | |
download | mate-panel-88cd57f64f498be7223847540d3bc84e7ac5cd99.tar.bz2 mate-panel-88cd57f64f498be7223847540d3bc84e7ac5cd99.tar.xz |
clock: fix remaining deprecation for GTK+ >= 3.20
Diffstat (limited to 'applets')
-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 8cc632f9..1a545067 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -384,8 +384,10 @@ calculate_minimum_height (GtkWidget *widget, GtkBorder padding; 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; @@ -405,10 +407,12 @@ calculate_minimum_height (GtkWidget *widget, pango_font_metrics_unref (metrics); 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 if (orientation == MATE_PANEL_APPLET_ORIENT_UP || orientation == MATE_PANEL_APPLET_ORIENT_DOWN) { @@ -417,7 +421,11 @@ calculate_minimum_height (GtkWidget *widget, thickness = padding.left + padding.right; } +#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 |