aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-03-26 18:06:08 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-03-26 18:06:08 +0900
commitbc860d5cb14ef792251324de54041efcb75538cd (patch)
tree2cb7ddbf0efd7894142b61994e63b06269936d01
parentelm win - fix tracking of current position to properly store it in win obj (diff)
downloadelementary-bc860d5cb14ef792251324de54041efcb75538cd.tar.gz
general "bugfix" via feature - add version numbering for elm theme
this now has elm themes have a version number. we start at 110 (just matches efl/elm 1.10 that this will be released in) and this means theme files that do not claim a recent enough version (or claim no version at all) will not load/be used. default should/would always provide this so you always will fall back.
-rw-r--r--data/themes/default.edc4
-rw-r--r--src/lib/elm_theme.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/data/themes/default.edc b/data/themes/default.edc
index 28544db8f..157d52fb6 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -2,6 +2,10 @@
externals.external: "elm";
+// theme api version. from 1.10 on we will check version to avoid
+// compat issues
+data.item: "version" "110";
+
collections {
#include "fonts.edc"
#include "colorclasses.edc"
diff --git a/src/lib/elm_theme.c b/src/lib/elm_theme.c
index d6f47f020..9ba16f5fe 100644
--- a/src/lib/elm_theme.c
+++ b/src/lib/elm_theme.c
@@ -31,8 +31,16 @@ _elm_theme_item_finalize(Elm_Theme_Files *files,
Eina_File *f,
Eina_Bool prepend)
{
+ char *version;
+
if (!f) return;
-
+ if (!(version = edje_mmap_data_get(f, "version"))) return;
+ if (atoi(version) < 110) // bump this version number when we need to
+ {
+ free(version);
+ return;
+ }
+ free(version);
if (prepend)
{
files->items = eina_list_prepend(files->items,