summaryrefslogtreecommitdiff
path: root/gtk/gtkbuiltinicon.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-02-05 02:46:13 +0100
committerBenjamin Otte <otte@redhat.com>2020-02-05 02:46:13 +0100
commit546a748cd8859daeb6e1ab78579396dc62977945 (patch)
tree94bf99a73d8b092ff5ac4d26616ac9792078f565 /gtk/gtkbuiltinicon.c
parent8722837e672cbea144d4660c06cc394d94f0c9f1 (diff)
downloadgtk+-546a748cd8859daeb6e1ab78579396dc62977945.tar.gz
widget: Replace style-updated signal with css_changed vfunc
1. Rename the thing 2. Turn it from a signal to a vfunc 3. Pass the GtkCssStyleChange to it We don't export any public API about the GtkCssStyleChange yet, it's just a boring opaque struct.
Diffstat (limited to 'gtk/gtkbuiltinicon.c')
-rw-r--r--gtk/gtkbuiltinicon.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gtk/gtkbuiltinicon.c b/gtk/gtkbuiltinicon.c
index f6a819159c..b91864db44 100644
--- a/gtk/gtkbuiltinicon.c
+++ b/gtk/gtkbuiltinicon.c
@@ -55,15 +55,10 @@ gtk_builtin_icon_snapshot (GtkWidget *widget,
}
static void
-gtk_builtin_icon_style_updated (GtkWidget *widget)
+gtk_builtin_icon_css_changed (GtkWidget *widget,
+ GtkCssStyleChange *change)
{
- GtkStyleContext *context;
- GtkCssStyleChange *change = NULL;
-
- context = gtk_widget_get_style_context (widget);
- change = gtk_style_context_get_change (context);
-
- GTK_WIDGET_CLASS (gtk_builtin_icon_parent_class)->style_updated (widget);
+ GTK_WIDGET_CLASS (gtk_builtin_icon_parent_class)->css_changed (widget, change);
if (change == NULL ||
gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_ICON_SIZE))
@@ -99,7 +94,7 @@ gtk_builtin_icon_class_init (GtkBuiltinIconClass *klass)
wclass->snapshot = gtk_builtin_icon_snapshot;
wclass->measure = gtk_builtin_icon_measure;
- wclass->style_updated = gtk_builtin_icon_style_updated;
+ wclass->css_changed = gtk_builtin_icon_css_changed;
}
static void