Avoid emitting ::style-set by name
GtkStyle is deprecated, but we still emit ::style-set quite a bit, so lets at least not be slow while doing it.
This commit is contained in:
parent
12dfb368e2
commit
0f116135f4
@ -4154,8 +4154,6 @@ gtk_widget_ensure_style (GtkWidget *widget)
|
||||
{
|
||||
g_object_unref (style);
|
||||
_gtk_widget_set_style (widget, NULL);
|
||||
|
||||
g_signal_emit_by_name (widget, "style-set", 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5439,9 +5439,9 @@ gtk_widget_realize (GtkWidget *widget)
|
||||
if (priv->parent && !_gtk_widget_get_realized (priv->parent))
|
||||
gtk_widget_realize (priv->parent);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_widget_ensure_style (widget);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
if (priv->style_update_pending)
|
||||
g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0);
|
||||
@ -16599,6 +16599,7 @@ void
|
||||
_gtk_widget_set_style (GtkWidget *widget,
|
||||
GtkStyle *style)
|
||||
{
|
||||
g_signal_emit (widget, widget_signals[STYLE_SET], 0, widget->priv->style);
|
||||
widget->priv->style = style;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user