[gtk+] widget: Update the font at the right place



commit c6285387e3b8b839df377b32c4b4d1210d3afb29
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jun 4 21:13:19 2011 +0200

    widget: Update the font at the right place
    
    Doing it unconditionally is not useful when the subclasses actually
    using them can only ever do it in the style_updated signal. So do it in
    the style_updated handler instead.

 gtk/gtkwidget.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 340dd9e..95079d9 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -6495,6 +6495,8 @@ gtk_widget_real_style_updated (GtkWidget *widget)
 {
   GtkWidgetPrivate *priv = widget->priv;
 
+  gtk_widget_update_pango_context (widget);
+
   if (priv->style != NULL &&
       priv->style != gtk_widget_get_default_style ())
     {
@@ -14330,8 +14332,6 @@ style_context_changed (GtkStyleContext *context,
 {
   GtkWidget *widget = user_data;
 
-  gtk_widget_update_pango_context (widget);
-
   if (gtk_widget_get_realized (widget))
     g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0);
   else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]