Commit Graph

9 Commits

Author SHA1 Message Date
Christian Persch
57143e311d Inherit gettext-domain from <schemalist>
When the <schema> doesn't have a 'gettext-domain' attribute, but
the <schemalist> does, use that one.

Bug #635640.
2010-11-28 19:01:21 +01:00
Matthias Clasen
9040eac4eb Prevent error pileup 2010-10-16 23:31:30 -04:00
Ryan Lortie
833e389516 schema compiler: Don't store zero-valued flags
Don't store the "none" value for flags into the compiled schema file.
"none" should never appear as a value -- no flags set is indicated by an
empty array.
2010-10-04 02:57:06 -04:00
Ryan Lortie
8efcc0d8c8 glib-compile-schemas: write strinfo little endian
Ensure that the strinfo is output in little-endian byte order on big
endian machines.

GSettings is now passing all of its tests on PowerPC.

Bug #630968 is closed.
2010-10-03 23:26:18 -04:00
Ryan Lortie
3e771509b4 Bug 628937 - gracefully handle broken schemas
Implement the second feature requested in the bug: silently ignore
override files that attempt to override schemas that are not currently
installed.

Also, support 'strictness' being optional for other errors when parsing
override files (ie: inability to open the file, unknown key name, parse
errors, out of range).  We don't completely back out the file in this
case — as that is difficult with the current implementation — but just
ignore the override for the single key.
2010-10-01 11:21:13 -04:00
Ryan Lortie
bd290081ff glib-compile-schemas: improve error accuracy
We wrote "<enum> must contain at least one <value>" for empty <flags>.
Fix that.
2010-10-01 11:21:07 -04:00
Ryan Lortie
e40f3932dd Bug 628937 - gracefully handle broken schemas
Implement the first of two features requested in the bug: when
encountering a broken .xml schema file, back out the changes in that
file and continue to parse other files.

This prevents a single broken .xml file from messing up GSettings for
everyone else.

Add a --strict option to get the old behaviour.  Use this from the test
cases.
2010-10-01 11:21:02 -04:00
Ryan Lortie
f8cb2a60b9 Add 3 new restrictions to the schema compiler
- can not extend schemas that already have paths
 - can not form list of schemas that already have paths
 - the path of a list schema, if given, must end with ':/'
2010-09-09 16:43:03 -04:00
Ryan Lortie
7777dd2c39 Rename gschema-compile.c -> glib-compile-schemas.c 2010-09-09 16:42:55 -04:00