summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-08-19 18:41:00 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2010-04-13 13:40:16 -0400
commit020aea033c57924abf60fb3c1477a89f9f8dbd5c (patch)
tree0c820779b18513fdf9dbbec31fa33b919ac06217 /doc
parent0ac46316afe0db47cab12ec8901704019243e0f9 (diff)
downloadmutter-020aea033c57924abf60fb3c1477a89f9f8dbd5c.tar.gz
metacity-theme-3.xml: Add a flexible version mechanism
The current mechanism of metacity-theme-1.xml and metacity-theme-2.xml is not flexible for allowing small-scale additions. With this patch we bump the major version version once more to metacity-theme-3.xml and add a single feature: Any element in the DTD can have an attribute: version="[<|<=|=>|>] MAJOR.MINOR" And it will be ignored unless the predicate is met. (< and > should be to be entity escaped as &lt; and &gt;) This allows having alternate sections of the theme file for older and newer version. * Required GLib version is bumped to 2.14 so we can parse versions with a regular expression. * We switch internal version numbers to be "1000 * major + minor" * We keep a stack of the maximum required version for the current portion the XML tree so that the "cannot use versions you don't require" stricture of the old code can be made local to a subpart of the tree. * A version on the top metacity_theme element causes the entire file to be ignored; this allows having one metacity-theme-3.xml for version 3.2 and newer (say) and a metacity-1.xml for everything old. Actual new features will be added starting with 3.1 - 3.0 is just the version="" feature. http://bugzilla.gnome.org/show_bug.cgi?id=592503
Diffstat (limited to 'doc')
-rw-r--r--doc/theme-format.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/theme-format.txt b/doc/theme-format.txt
index 95a6b4e76..bb79d4534 100644
--- a/doc/theme-format.txt
+++ b/doc/theme-format.txt
@@ -4,6 +4,7 @@ of the theme format, and a given theme can support more than one format.
Version 1: THEMEDIR/metacity-1/metacity-theme-1.xml
(original metacity format)
Version 2: THEMEDIR/metacity-1/metacity-theme-2.xml
+Version 3: THEMEDIR/metacity-1/metacity-theme-3.xml
The subdirectory name is "metacity-1" in all versions.
@@ -21,6 +22,27 @@ This document has separate sections for each format version. You may
want to read the document in reverse order, since the base features
are discussed under version 1.
+New Features in Theme Format Version 3
+======================================
+
+Format version 3 has exactly one new feature; any element in the file
+can now have a version attribute:
+
+ version="[<|<=|=>|>] MAJOR.MINOR"
+
+(< and > should be to be entity escaped as &lt; and &gt;). If this
+version check is not met, then the element and its children will be
+ignored. This allows having alternate sections of the theme file for
+older and newer version of the Metacity theme format.
+
+When placed on the toplevel <metacity_theme> element, an unsatisfied
+version check will not just cause the contents of the file to be
+ignored, it will also cause the lookup of a theme file to proceed on
+and look for an older format 2 or format 1 file. This allows making a
+metacity-theme-3.xml file that is only used the format version 3.2 or
+newer is supported, and using metacity-theme-1.xml for older window
+managers.
+
New Features in Theme Format Version 2
======================================