Replace child{1,2} attributes in xml views by a unique child

This commit is contained in:
Cédric Krier
2010-03-19 15:24:10 +01:00
parent 5db2dc4025
commit 4060c59560
5 changed files with 29 additions and 110 deletions
+1
View File
@@ -1,3 +1,4 @@
* Replace child{1,2} attributes in xml views by a unique child
* Models that uses _inherits will search in inherited parents for missing functions
* Remove ids from on_change* calls
* Improve search on translatable fields
+5 -20
View File
@@ -96,30 +96,16 @@ attlist.group &= [ a:defaultValue = "1" ] attribute rowspan { text }?
attlist.group &= [ a:defaultValue = "4" ] attribute col { text }?
attlist.group &= attribute id { text }
hpaned = element hpaned { attlist.paned, child1?, child2? }
hpaned = element hpaned { attlist.paned, child* }
vpaned = element vpaned { attlist.paned, child1?, child2? }
vpaned = element vpaned { attlist.paned, child* }
attlist.paned &= [ a:defaultValue = "4" ] attribute colspan { text }?
attlist.paned &= attribute position { text }?
attlist.paned &= attribute id { text }
child1 =
element child1 {
attlist.child,
(image
| separator
| label
| newline
| notebook
| group
| hpaned
| vpaned
| action)*
}
child2 =
element child2 {
child =
element child {
attlist.child,
(image
| separator
@@ -148,8 +134,7 @@ xpath = element xpath { attlist.xpath,
| vpaned
| action
| page
| child1
| child2
| child
| board
)*
}
+9 -34
View File
@@ -343,23 +343,17 @@
<define name="hpaned">
<element name="hpaned">
<ref name="attlist.paned"/>
<optional>
<ref name="child1"/>
</optional>
<optional>
<ref name="child2"/>
</optional>
<zeroOrMore>
<ref name="child"/>
</zeroOrMore>
</element>
</define>
<define name="vpaned">
<element name="vpaned">
<ref name="attlist.paned"/>
<optional>
<ref name="child1"/>
</optional>
<optional>
<ref name="child2"/>
</optional>
<zeroOrMore>
<ref name="child"/>
</zeroOrMore>
</element>
</define>
<define name="attlist.paned" combine="interleave">
@@ -375,26 +369,8 @@
<define name="attlist.paned" combine="interleave">
<attribute name="id"/>
</define>
<define name="child1">
<element name="child1">
<ref name="attlist.child"/>
<zeroOrMore>
<choice>
<ref name="image"/>
<ref name="separator"/>
<ref name="label"/>
<ref name="newline"/>
<ref name="notebook"/>
<ref name="group"/>
<ref name="hpaned"/>
<ref name="vpaned"/>
<ref name="action"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="child2">
<element name="child2">
<define name="child">
<element name="child">
<ref name="attlist.child"/>
<zeroOrMore>
<choice>
@@ -440,8 +416,7 @@
<ref name="vpaned"/>
<ref name="action"/>
<ref name="page"/>
<ref name="child1"/>
<ref name="child2"/>
<ref name="child"/>
<ref name="board"/>
</choice>
</zeroOrMore>
+5 -21
View File
@@ -207,31 +207,16 @@ attlist.group &= [ a:defaultValue = "1" ] attribute rowspan { text }?
attlist.group &= [ a:defaultValue = "4" ] attribute col { text }?
attlist.group &= ( attribute name { text } | attribute id { text } )
hpaned = element hpaned { attlist.paned, child1?, child2? }
hpaned = element hpaned { attlist.paned, child* }
vpaned = element vpaned { attlist.paned, child1?, child2? }
vpaned = element vpaned { attlist.paned, child* }
attlist.paned &= [ a:defaultValue = "4" ] attribute colspan { text }?
attlist.paned &= attribute position { text }?
attlist.paned &= attribute id { text }
child1 =
element child1 {
attlist.child,
(label
| field
| image
| separator
| newline
| button
| notebook
| group
| hpaned
| vpaned)*
}
child2 =
element child2 {
child =
element child {
attlist.child,
(label
| field
@@ -267,8 +252,7 @@ xpath = element xpath { attlist.xpath,
| x
| y
| page
| child1
| child2)*
| child)*
}
attlist.xpath &= attribute expr { text }
attlist.xpath &=
+9 -35
View File
@@ -745,23 +745,17 @@
<define name="hpaned">
<element name="hpaned">
<ref name="attlist.paned"/>
<optional>
<ref name="child1"/>
</optional>
<optional>
<ref name="child2"/>
</optional>
<zeroOrMore>
<ref name="child"/>
</zeroOrMore>
</element>
</define>
<define name="vpaned">
<element name="vpaned">
<ref name="attlist.paned"/>
<optional>
<ref name="child1"/>
</optional>
<optional>
<ref name="child2"/>
</optional>
<zeroOrMore>
<ref name="child"/>
</zeroOrMore>
</element>
</define>
<define name="attlist.paned" combine="interleave">
@@ -777,27 +771,8 @@
<define name="attlist.paned" combine="interleave">
<attribute name="id"/>
</define>
<define name="child1">
<element name="child1">
<ref name="attlist.child"/>
<zeroOrMore>
<choice>
<ref name="label"/>
<ref name="field"/>
<ref name="image"/>
<ref name="separator"/>
<ref name="newline"/>
<ref name="button"/>
<ref name="notebook"/>
<ref name="group"/>
<ref name="hpaned"/>
<ref name="vpaned"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="child2">
<element name="child2">
<define name="child">
<element name="child">
<ref name="attlist.child"/>
<zeroOrMore>
<choice>
@@ -850,8 +825,7 @@
<ref name="x"/>
<ref name="y"/>
<ref name="page"/>
<ref name="child1"/>
<ref name="child2"/>
<ref name="child"/>
</choice>
</zeroOrMore>
</element>