diff options
author | Cedric BAIL <cedric.bail@free.fr> | 2011-06-30 09:49:24 +0000 |
---|---|---|
committer | Cedric BAIL <cedric.bail@free.fr> | 2011-06-30 09:49:24 +0000 |
commit | 4ecb2fccad24fd894617adbbc69bbed679ad5cb6 (patch) | |
tree | 9835de9a217fbf7d527195de71d3a71afc20eade /legacy/emotion/src/lib/emotion_smart.c | |
parent | cf430612a0d0a2c2d4c0a390e7afe2fa1c591a23 (diff) |
emotion: cleanup emotion async loader on file set.
SVN revision: 60869
Diffstat (limited to '')
-rw-r--r-- | legacy/emotion/src/lib/emotion_smart.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c index c84d60c513..a4a2fb9ea9 100644 --- a/legacy/emotion/src/lib/emotion_smart.c +++ b/legacy/emotion/src/lib/emotion_smart.c | |||
@@ -395,6 +395,12 @@ emotion_object_file_set(Evas_Object *obj, const char *file) | |||
395 | eina_stringshare_replace(&sd->file, NULL); | 395 | eina_stringshare_replace(&sd->file, NULL); |
396 | } | 396 | } |
397 | 397 | ||
398 | #ifdef HAVE_EIO | ||
399 | /* Only cancel the load_xattr or we will loose ref to time_seek stringshare */ | ||
400 | if (sd->load_xattr) eio_file_cancel(sd->load_xattr); | ||
401 | sd->load_xattr = NULL; | ||
402 | #endif | ||
403 | |||
398 | return EINA_TRUE; | 404 | return EINA_TRUE; |
399 | } | 405 | } |
400 | 406 | ||
@@ -1023,16 +1029,16 @@ emotion_object_vis_supported(const Evas_Object *obj, Emotion_Vis visualization) | |||
1023 | 1029 | ||
1024 | #ifdef HAVE_EIO | 1030 | #ifdef HAVE_EIO |
1025 | static void | 1031 | static void |
1026 | _eio_load_xattr_cleanup(Smart_Data *sd) | 1032 | _eio_load_xattr_cleanup(Smart_Data *sd, Eio_File *handler) |
1027 | { | 1033 | { |
1028 | sd->load_xattr = NULL; | 1034 | if (handler == sd->load_xattr) sd->load_xattr = NULL; |
1029 | 1035 | ||
1030 | EINA_REFCOUNT_UNREF(sd) | 1036 | EINA_REFCOUNT_UNREF(sd) |
1031 | _smart_data_free(sd); | 1037 | _smart_data_free(sd); |
1032 | } | 1038 | } |
1033 | 1039 | ||
1034 | static void | 1040 | static void |
1035 | _eio_load_xattr_done(void *data, Eio_File *handler __UNUSED__, const char *xattr_data, unsigned int xattr_size) | 1041 | _eio_load_xattr_done(void *data, Eio_File *handler, const char *xattr_data, unsigned int xattr_size) |
1036 | { | 1042 | { |
1037 | Smart_Data *sd = data; | 1043 | Smart_Data *sd = data; |
1038 | 1044 | ||
@@ -1045,15 +1051,15 @@ _eio_load_xattr_done(void *data, Eio_File *handler __UNUSED__, const char *xattr | |||
1045 | emotion_object_position_set(evas_object_smart_parent_get(sd->obj), ldexp((double)m, e)); | 1051 | emotion_object_position_set(evas_object_smart_parent_get(sd->obj), ldexp((double)m, e)); |
1046 | } | 1052 | } |
1047 | 1053 | ||
1048 | _eio_load_xattr_cleanup(sd); | 1054 | _eio_load_xattr_cleanup(sd, handler); |
1049 | } | 1055 | } |
1050 | 1056 | ||
1051 | static void | 1057 | static void |
1052 | _eio_load_xattr_error(void *data, Eio_File *handler __UNUSED__, int err __UNUSED__) | 1058 | _eio_load_xattr_error(void *data, Eio_File *handler, int err __UNUSED__) |
1053 | { | 1059 | { |
1054 | Smart_Data *sd = data; | 1060 | Smart_Data *sd = data; |
1055 | 1061 | ||
1056 | _eio_load_xattr_cleanup(sd); | 1062 | _eio_load_xattr_cleanup(sd, handler); |
1057 | } | 1063 | } |
1058 | #endif | 1064 | #endif |
1059 | 1065 | ||