summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2014-03-20 21:16:59 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2014-03-21 10:08:16 +0100
commitd3d5bb1dfc21ac30b77fc4484ff942d0a9100275 (patch)
treed6398d9f762a53aea52e8685916f80ec05f8220b /sample
parent050e064c40dafe1e90307870e02ad29815fe9f74 (diff)
downloadcataract-d3d5bb1dfc21ac30b77fc4484ff942d0a9100275.tar.xz
Make setup files versioned and add fallback for old versions
This commit makes setup files (setup.xml and referenced design setup xml file) versioned and adds checks for correct versions. If a newer versioned file is detected, warning is printed out in assumption that a stray cgg version is used. If the version information is missing or is lower than expected version, files are read in legacy mode. Some values are left on defaults and missing mandatory values are either read from renamed keys or made up to suit current requirements. This essentially brings back compatibility with old setup.xml files that are usually part of galleries. However, some values are hardcoded and should be kept in mind to update and test the legacy mode along with future enhancements.
Diffstat (limited to 'sample')
-rw-r--r--sample/src/setup.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/src/setup.xml b/sample/src/setup.xml
index b240c4a..327659d 100644
--- a/sample/src/setup.xml
+++ b/sample/src/setup.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<gallery_setup>
+<gallery_setup version="2.0">
<design>
<!-- path to the design setup xml file -->
<setup_file>../../templates/default.xml</setup_file>