Added bindings support to GtkBuilder by introducing 3 new <property> attributes "bind-source" to specify the source object of the binding "bind-property" to specify the source property and "bind-flags" to specify the binding flags (optional)

Binding an object sensitive property with a check button active property will look like this:

<object class="GtkButton" id="button">
  <property name="sensitive" bind-source="checkbutton" bind-property="active"/>
</object>

This is based on the original work done by Denis Washington for his GSoC project

This closes Bug 654417 "[GSoC] Add <binding> element to GtkBuilder syntax"
This commit is contained in:
Juan Pablo Ugarte
2014-04-11 16:24:04 -03:00
parent be9d1e0b3b
commit 887fc60cce
6 changed files with 212 additions and 7 deletions

View File

@ -27,6 +27,9 @@ property = element property {
attribute translatable { "yes" | "no" } ?,
attribute comments { text } ?,
attribute context { text } ?,
(attribute bind-source { text },
attribute bind-property { text },
attribute bind-flags { text } ?) ?,
text ?
}