From bc3c2d1d5b6cf8ad2c6b4a64f41361a248f89d90 Mon Sep 17 00:00:00 2001 From: Sebastien Bacher Date: Tue, 28 May 2013 19:05:11 +0200 Subject: use gtk_style_context_get instead of deprecated gtk_style_context_get_font --- src/ido-detail-label.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ido-detail-label.c b/src/ido-detail-label.c index 780a2dd..9a163b7 100644 --- a/src/ido-detail-label.c +++ b/src/ido-detail-label.c @@ -140,8 +140,9 @@ gtk_widget_get_font_metrics (GtkWidget *widget, { const PangoFontDescription *font; - font = gtk_style_context_get_font (gtk_widget_get_style_context (widget), - gtk_widget_get_state_flags (widget)); + gtk_style_context_get (gtk_widget_get_style_context (widget), + gtk_widget_get_state_flags (widget), + "font", &font, NULL); return pango_context_get_metrics (context, font, -- cgit v1.2.3 From ebcad53cbfe52dc19462cd6021fe676b493b7a83 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Wed, 29 May 2013 09:55:39 -0400 Subject: ido-detail-label.c: free font desc --- src/ido-detail-label.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ido-detail-label.c b/src/ido-detail-label.c index 9a163b7..8b7ef90 100644 --- a/src/ido-detail-label.c +++ b/src/ido-detail-label.c @@ -138,15 +138,19 @@ static PangoFontMetrics * gtk_widget_get_font_metrics (GtkWidget *widget, PangoContext *context) { - const PangoFontDescription *font; + PangoFontDescription *font; + PangoFontMetrics *metrics; gtk_style_context_get (gtk_widget_get_style_context (widget), gtk_widget_get_state_flags (widget), "font", &font, NULL); - return pango_context_get_metrics (context, - font, - pango_context_get_language (context)); + metrics = pango_context_get_metrics (context, + font, + pango_context_get_language (context)); + + pango_font_description_free (font); + return metrics; } static gint -- cgit v1.2.3