aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-01-11 00:23:25 +0800
committerEmilio Pozuelo Monfort <emilio.pozuelo@collabora.co.uk>2011-01-11 19:37:19 +0800
commit4dab5e45e10c4aa8d305a7cc5be62cee243f029b (patch)
tree81e7e4b53799fc8f5fcecaef1b99e5bd03c188b4
parent05047bfdd596bf6010d09f9409ff13a74190ed4c (diff)
downloadgsoc2013-empathy-4dab5e45e10c4aa8d305a7cc5be62cee243f029b.tar
gsoc2013-empathy-4dab5e45e10c4aa8d305a7cc5be62cee243f029b.tar.gz
gsoc2013-empathy-4dab5e45e10c4aa8d305a7cc5be62cee243f029b.tar.bz2
gsoc2013-empathy-4dab5e45e10c4aa8d305a7cc5be62cee243f029b.tar.lz
gsoc2013-empathy-4dab5e45e10c4aa8d305a7cc5be62cee243f029b.tar.xz
gsoc2013-empathy-4dab5e45e10c4aa8d305a7cc5be62cee243f029b.tar.zst
gsoc2013-empathy-4dab5e45e10c4aa8d305a7cc5be62cee243f029b.zip
Don't use deprecated gtk_widget_get_style()
-rw-r--r--src/empathy-chat-window.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 9f893dc7e..94598ad84 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -226,13 +226,17 @@ chat_tab_style_set_cb (GtkWidget *hbox,
GtkWidget *button;
int char_width, h, w;
PangoContext *context;
+ const 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);
- metrics = pango_context_get_metrics (context, gtk_widget_get_style (hbox)->font_desc,
+ font_desc = gtk_style_context_get_font (gtk_widget_get_style_context (hbox),
+ GTK_STATE_FLAG_NORMAL);
+
+ metrics = pango_context_get_metrics (context, font_desc,
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_char_width (metrics);
pango_font_metrics_unref (metrics);