diff options
Diffstat (limited to 'src/empathy-chat-window.c')
-rw-r--r-- | src/empathy-chat-window.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 9f893dc7e..07b940e3f 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -219,20 +219,23 @@ chat_window_close_clicked_cb (GtkAction *action, } static void -chat_tab_style_set_cb (GtkWidget *hbox, - GtkStyle *previous_style, - gpointer user_data) +chat_tab_style_updated_cb (GtkWidget *hbox, + gpointer user_data) { 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); @@ -335,8 +338,8 @@ chat_window_create_label (EmpathyChatWindow *window, /* React to theme changes and also setup the size correctly. */ g_signal_connect (hbox, - "style-set", - G_CALLBACK (chat_tab_style_set_cb), + "style-updated", + G_CALLBACK (chat_tab_style_updated_cb), chat); } |