efreet: Revert changed flag

Only send event when cache is actually updated.

SVN revision: 62548
This commit is contained in:
Sebastian Dransfeld 2011-08-18 07:34:02 +00:00
parent 7a281f0745
commit c31f9f2049
2 changed files with 12 additions and 13 deletions

View File

@ -70,7 +70,7 @@ typedef struct _Efreet_Event_Cache_Update Efreet_Event_Cache_Update;
*/ */
struct _Efreet_Event_Cache_Update struct _Efreet_Event_Cache_Update
{ {
int changed; /**< @since 1.1.0 */ int dummy;
}; };
/** /**

View File

@ -1076,11 +1076,11 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__,
if (!file) return; if (!file) return;
if (!strcmp(file, "desktop_data.update")) if (!strcmp(file, "desktop_data.update"))
{ {
ev = NEW(Efreet_Event_Cache_Update, 1);
if (!ev) goto error;
ev->changed = 0;
if (cache_check_change(path)) if (cache_check_change(path))
{ {
ev = NEW(Efreet_Event_Cache_Update, 1);
if (!ev) goto error;
IF_RELEASE(util_cache_names_key); IF_RELEASE(util_cache_names_key);
IF_RELEASE(util_cache_hash_key); IF_RELEASE(util_cache_hash_key);
@ -1106,19 +1106,19 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__,
} }
util_cache = efreet_cache_close(util_cache); util_cache = efreet_cache_close(util_cache);
ev->changed = 1;
ecore_event_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE, ev, desktop_cache_update_free, d);
} }
ecore_event_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE, ev, desktop_cache_update_free, d);
/* TODO: Check if desktop_dirs_add exists, and rebuild cache if */ /* TODO: Check if desktop_dirs_add exists, and rebuild cache if */
} }
else if (!strcmp(file, "icon_data.update")) else if (!strcmp(file, "icon_data.update"))
{ {
ev = NEW(Efreet_Event_Cache_Update, 1);
if (!ev) goto error;
ev->changed = 0;
if (cache_check_change(path)) if (cache_check_change(path))
{ {
ev = NEW(Efreet_Event_Cache_Update, 1);
if (!ev) goto error;
IF_RELEASE(theme_name); IF_RELEASE(theme_name);
/* Save all old caches */ /* Save all old caches */
@ -1148,11 +1148,10 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__,
icon_theme_cache = NULL; icon_theme_cache = NULL;
icon_cache = NULL; icon_cache = NULL;
fallback_cache = NULL; fallback_cache = NULL;
ev->changed = 1;
}
/* Send event */ /* Send event */
ecore_event_add(EFREET_EVENT_ICON_CACHE_UPDATE, ev, icon_cache_update_free, l); ecore_event_add(EFREET_EVENT_ICON_CACHE_UPDATE, ev, icon_cache_update_free, l);
}
} }
return; return;
error: error: