summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-03-05 16:23:13 +0000
committerDana Jansens <danakj@orodu.net>2007-03-05 16:23:13 +0000
commit45087efbcdeec8a4cc985125a656a4bd6e9f3b3e (patch)
tree84e122e6ce2d4b703a66447575f573dd3b1bee9d
parent88204502a800f57b582e829d25cfeb899d444802 (diff)
point and padding became redundant.. do remove padding type from xsd and use point type. also fix bug in theme parser where it was looking for wrong one.
-rwxr-xr-xdata/themerc.xsd9
-rw-r--r--render/theme.c4
-rw-r--r--tools/themetoxml/themetoxml.c8
3 files changed, 8 insertions, 13 deletions
diff --git a/data/themerc.xsd b/data/themerc.xsd
index 7b9573d9..621f99c6 100755
--- a/data/themerc.xsd
+++ b/data/themerc.xsd
@@ -22,11 +22,6 @@
</xs:annotation>
</xs:element>
- <xs:complexType name="padding">
- <xs:attribute name="horizontal" type="xs:integer"/>
- <xs:attribute name="vertical" type="xs:integer"/>
- </xs:complexType>
-
<xs:complexType name="color">
<xs:attribute name="r" type="xs:integer"/>
<xs:attribute name="g" type="xs:integer"/>
@@ -136,7 +131,7 @@
<xs:complexType name="allwindows">
<xs:all>
- <xs:element name="clientpadding" type="obt:padding" minOccurs="0"/>
+ <xs:element name="clientpadding" type="obt:point" minOccurs="0"/>
<xs:element name="justify" type="obt:justify" minOccurs="0"/>
<xs:element name="border" type="obt:border" minOccurs="0"/>
<xs:element name="inactive" type="obt:window" minOccurs="0"/>
@@ -152,7 +147,7 @@
<xs:complexType name="themeDimensions">
<xs:all>
- <xs:element name="padding" type="obt:padding" minOccurs="0"/>
+ <xs:element name="padding" type="obt:point" minOccurs="0"/>
<xs:element name="handle" type="xs:integer" minOccurs="0"/>
</xs:all>
</xs:complexType>
diff --git a/render/theme.c b/render/theme.c
index c31ca112..95b48896 100644
--- a/render/theme.c
+++ b/render/theme.c
@@ -1307,8 +1307,8 @@ static gboolean find_point(ParseState *ps, xmlNodePtr n, gchar *names[],
{
if ((n = find_node(n, names))) {
gint a, b;
- if (parse_attr_int("horizontal", n, &a) &&
- parse_attr_int("vertical", n, &b) &&
+ if (parse_attr_int("x", n, &a) &&
+ parse_attr_int("y", n, &b) &&
a >= lowx && a <= upx && b >= lowy && b <= upy)
{
*x = a; *y = b;
diff --git a/tools/themetoxml/themetoxml.c b/tools/themetoxml/themetoxml.c
index 56a5f9c7..c03bd29f 100644
--- a/tools/themetoxml/themetoxml.c
+++ b/tools/themetoxml/themetoxml.c
@@ -321,8 +321,8 @@ int main(int argc, char **argv)
CONT2("dimensions", "handle", NUM(i));
if (read_int(db, "padding.width", &i)) {
- ATTR2("dimensions", "padding", "horizontal", NUM(i));
- ATTR2("dimensions", "padding", "vertical", NUM(i));
+ ATTR2("dimensions", "padding", "x", NUM(i));
+ ATTR2("dimensions", "padding", "y", NUM(i));
}
if (read_int(db, "borderWidth", &i)) {
@@ -339,8 +339,8 @@ int main(int argc, char **argv)
}
if (read_int(db, "window.client.padding.width", &i)) {
- ATTR2("window", "clientpadding", "horizontal", NUM(i));
- ATTR2("window", "clientpadding", "vertical", NUM(i));
+ ATTR2("window", "clientpadding", "x", NUM(i));
+ ATTR2("window", "clientpadding", "y", NUM(i));
}
if (read_string(db, "window.label.text.justify", &s)) {