CSS provider: Add a way to emit errors

Desktop / GNOME / GTK - Matthias Clasen [redhat.com] - 29 January 2016 23:29 UTC

Currently, GtkCssProvider can emit ::parsing-error only during the actual parsing, although the documentation hints that it might happen at other times.

This commit adds a emit_error method to the GtkStyleProviderPrivate interface that will let us emit errors from the compute() implementations as well, which can be useful (e.g. if an image fails to load).

2c7fdf6 CSS provider: Add a way to emit errors
gtk/gtkcssprovider.c | 26 +++++++++++++++++---------
gtk/gtkstyleproviderprivate.c | 13 +++++++++++++
gtk/gtkstyleproviderprivate.h | 8 +++++++-
3 files changed, 37 insertions(+), 10 deletions(-)

Upstream: git.gnome.org


  • Share