edje: check that the file on disk didn't change when we try to reopen it.
SVN revision: 70883
This commit is contained in:
parent
cc3caf6172
commit
8f61823f67
|
@ -431,3 +431,5 @@
|
||||||
2012-05-09 Cedric Bail
|
2012-05-09 Cedric Bail
|
||||||
|
|
||||||
* Fix bug in case of nesting edje_object_signal_emit and edje_object_signal_callback_{add,del}
|
* Fix bug in case of nesting edje_object_signal_emit and edje_object_signal_callback_{add,del}
|
||||||
|
* Check that the file changed on disk when trying to reopen it.
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ Improvements:
|
||||||
Fixes:
|
Fixes:
|
||||||
* Add missing files in the tarballs.
|
* Add missing files in the tarballs.
|
||||||
* Prevent crash when running nested edje_object_signal_emit with edje_object_signal_callback_{add,del}.
|
* Prevent crash when running nested edje_object_signal_emit with edje_object_signal_callback_{add,del}.
|
||||||
|
* Do actually verify that the file on disk is different from the file we have loaded.
|
||||||
|
|
||||||
Edje 1.2.0
|
Edje 1.2.0
|
||||||
|
|
||||||
|
|
|
@ -290,8 +290,16 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
if (!file) file = "";
|
if (!file) file = "";
|
||||||
if (!group) group = "";
|
if (!group) group = "";
|
||||||
if (((ed->path) && (!strcmp(file, ed->path))) &&
|
if (((ed->path) && (!strcmp(file, ed->path))) &&
|
||||||
(ed->group) && (!strcmp(group, ed->group)))
|
(ed->group) && (!strcmp(group, ed->group)) &&
|
||||||
return 1;
|
ed->file)
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
|
if (stat(file, &st) != 0)
|
||||||
|
return 1;
|
||||||
|
if (st.st_mtime == ed->file->mtime)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
tev = evas_object_evas_get(obj);
|
tev = evas_object_evas_get(obj);
|
||||||
evas_event_freeze(tev);
|
evas_event_freeze(tev);
|
||||||
|
@ -299,6 +307,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
|
||||||
|
|
||||||
if (_edje_script_only(ed)) _edje_script_only_shutdown(ed);
|
if (_edje_script_only(ed)) _edje_script_only_shutdown(ed);
|
||||||
if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed);
|
if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed);
|
||||||
|
|
||||||
_edje_file_del(ed);
|
_edje_file_del(ed);
|
||||||
|
|
||||||
eina_stringshare_replace(&ed->path, file);
|
eina_stringshare_replace(&ed->path, file);
|
||||||
|
|
Loading…
Reference in New Issue