raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=bc860d5cb14ef792251324de54041efcb75538cd

commit bc860d5cb14ef792251324de54041efcb75538cd
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Mar 26 18:06:08 2014 +0900

    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.
---
 data/themes/default.edc |  4 ++++
 src/lib/elm_theme.c     | 10 +++++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/data/themes/default.edc b/data/themes/default.edc
index 28544db..157d52f 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 d6f47f0..9ba16f5 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,

-- 


Reply via email to