aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2013-06-07 21:06:00 +0000
committerTarmac <Unknown>2013-06-07 21:06:00 +0000
commit0bc7b3dcc2926c257b41c758dbfb7281386ec7fa (patch)
tree54f1632f6d6318e982ecd515418dfa231bd14095
parentf82e3a0b7fae0354c7ca610e155c6afd77fafeca (diff)
parentebcad53cbfe52dc19462cd6021fe676b493b7a83 (diff)
downloadayatana-indicator-messages-0bc7b3dcc2926c257b41c758dbfb7281386ec7fa.tar.gz
ayatana-indicator-messages-0bc7b3dcc2926c257b41c758dbfb7281386ec7fa.tar.bz2
ayatana-indicator-messages-0bc7b3dcc2926c257b41c758dbfb7281386ec7fa.zip
use gtk_style_context_get instead of deprecated gtk_style_context_get_font.
Approved by Ted Gould, PS Jenkins bot.
-rw-r--r--src/ido-detail-label.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/ido-detail-label.c b/src/ido-detail-label.c
index 780a2dd..8b7ef90 100644
--- a/src/ido-detail-label.c
+++ b/src/ido-detail-label.c
@@ -138,14 +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);
- font = gtk_style_context_get_font (gtk_widget_get_style_context (widget),
- gtk_widget_get_state_flags (widget));
+ metrics = pango_context_get_metrics (context,
+ font,
+ pango_context_get_language (context));
- return pango_context_get_metrics (context,
- font,
- pango_context_get_language (context));
+ pango_font_description_free (font);
+ return metrics;
}
static gint