diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-09-05 09:33:12 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-09-05 09:52:39 +0200 |
commit | 3ce67215498ee974d39efc3b49455c9f4d9d4a01 (patch) | |
tree | 38d701219b3aef94fc2ad3f62bff76e778d9d7fb /src | |
parent | 6d0aaf470a2e8b189370eba8c30f0e7181fbd365 (diff) |
stop using gtk_style_context_get_font
It's been deprecated.
https://bugzilla.gnome.org/show_bug.cgi?id=707538
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-chat-window.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 609b52c2..f7c8707e 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -382,15 +382,17 @@ chat_tab_style_updated_cb (GtkWidget *hbox, GtkWidget *button; int char_width, h, w; PangoContext *context; - const PangoFontDescription *font_desc; + PangoFontDescription *font_desc; PangoFontMetrics *metrics; button = g_object_get_data (G_OBJECT (user_data), "chat-window-tab-close-button"); context = gtk_widget_get_pango_context (hbox); - font_desc = gtk_style_context_get_font (gtk_widget_get_style_context (hbox), - GTK_STATE_FLAG_NORMAL); + gtk_style_context_get (gtk_widget_get_style_context (hbox), + GTK_STATE_FLAG_NORMAL, + "font", &font_desc, + NULL); metrics = pango_context_get_metrics (context, font_desc, pango_context_get_language (context)); @@ -406,6 +408,7 @@ chat_tab_style_updated_cb (GtkWidget *hbox, 12 * PANGO_PIXELS (char_width) + 2 * w, -1); gtk_widget_set_size_request (button, w, h); + pango_font_description_free (font_desc); } static GtkWidget * |