diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-04-23 17:12:03 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-04-23 19:19:33 +0200 |
commit | ac6758f8f8a73e52fb2bec0fbe7eb3d18fc5a09a (patch) | |
tree | f763543122ddcde5416b316caeb512775aa9db6b /vala/valaproperty.vala | |
parent | 0e03a3327162519e2ce2837f34ff8e102ea256a8 (diff) | |
download | vala-ac6758f8f8a73e52fb2bec0fbe7eb3d18fc5a09a.tar.gz |
codegen: Support automatic properties as GtkChild
https://bugzilla.gnome.org/show_bug.cgi?id=787034
Diffstat (limited to 'vala/valaproperty.vala')
-rw-r--r-- | vala/valaproperty.vala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vala/valaproperty.vala b/vala/valaproperty.vala index 81bb84950..1bc54a532 100644 --- a/vala/valaproperty.vala +++ b/vala/valaproperty.vala @@ -118,6 +118,11 @@ public class Vala.Property : Symbol, Lockable { _field = new Field ("_%s".printf (name), property_type.copy (), initializer, source_reference); _field.access = SymbolAccessibility.PRIVATE; _field.binding = binding; + // apply gtk-child attribute to backing field for gtk-template support + if (get_attribute ("GtkChild") != null) { + _field.set_attribute_string ("GtkChild", "name", get_attribute_string ("GtkChild", "name", name)); + _field.set_attribute_bool ("GtkChild", "internal", get_attribute_bool ("GtkChild", "internal")); + } } } _field_checked = true; |