diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2014-04-29 16:22:32 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2014-05-01 17:59:53 -0300 |
commit | 49fa04212b644f19ce576a8011e3f4fcda6a0806 (patch) | |
tree | bcd193c9b4c61aff1638208d5a1e517a326af6db /gtk/gtkbuilder.h | |
parent | c4afca906c2ea02ae7a261d2e7e0c8902f3f09e5 (diff) | |
download | gtk+-49fa04212b644f19ce576a8011e3f4fcda6a0806.tar.gz |
GtkBuilder: improved parsing error report for invalid properties and signals.
Added GTK_BUILDER_ERROR_INVALID_PROPERTY and GTK_BUILDER_ERROR_INVALID_SIGNAL
error codes
ObjectInfo: Use a GType instead of a char * for the class name.
PropertyInfo: Use a GParamSpec instead of a char * for the property name.
SignalInfo: Use signal id and detail quark instead of a detailed signal name string.
This not only save us a few malloc in each case but lets us simplify the code
and report unknown properties and signals as a parsing error instead of just
printing a warning.
Diffstat (limited to 'gtk/gtkbuilder.h')
-rw-r--r-- | gtk/gtkbuilder.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkbuilder.h b/gtk/gtkbuilder.h index a548229eb1..12815d2f0a 100644 --- a/gtk/gtkbuilder.h +++ b/gtk/gtkbuilder.h @@ -62,6 +62,8 @@ typedef struct _GtkBuilderPrivate GtkBuilderPrivate; * @GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED: A specified object type is of the same type or * derived from the type of the composite class being extended with builder XML. * @GTK_BUILDER_ERROR_TEMPLATE_MISMATCH: The wrong type was specified in a composite class’s template XML + * @GTK_BUILDER_ERROR_INVALID_PROPERTY: The specified property is unknown for the object class. + * @GTK_BUILDER_ERROR_INVALID_SIGNAL: The specified signal is unknown for the object class. * * Error codes that identify various errors that can occur while using * #GtkBuilder. @@ -78,7 +80,9 @@ typedef enum GTK_BUILDER_ERROR_VERSION_MISMATCH, GTK_BUILDER_ERROR_DUPLICATE_ID, GTK_BUILDER_ERROR_OBJECT_TYPE_REFUSED, - GTK_BUILDER_ERROR_TEMPLATE_MISMATCH + GTK_BUILDER_ERROR_TEMPLATE_MISMATCH, + GTK_BUILDER_ERROR_INVALID_PROPERTY, + GTK_BUILDER_ERROR_INVALID_SIGNAL } GtkBuilderError; GDK_AVAILABLE_IN_ALL |