forked from enlightenment/efl
efreet: Add cache build event
And listen for this event in e_startup to check for cache build completion. SVN revision: 62549
This commit is contained in:
parent
c31f9f2049
commit
a43a9d363c
|
@ -114,6 +114,7 @@ static int strcmplen(const void *data1, const void *data2);
|
|||
|
||||
EAPI int EFREET_EVENT_ICON_CACHE_UPDATE = 0;
|
||||
EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0;
|
||||
EAPI int EFREET_EVENT_DESKTOP_CACHE_BUILD = 0;
|
||||
|
||||
int
|
||||
efreet_cache_init(void)
|
||||
|
@ -126,6 +127,7 @@ efreet_cache_init(void)
|
|||
|
||||
EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new();
|
||||
EFREET_EVENT_DESKTOP_CACHE_UPDATE = ecore_event_type_new();
|
||||
EFREET_EVENT_DESKTOP_CACHE_BUILD = ecore_event_type_new();
|
||||
|
||||
themes = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_cache_icon_theme_free));
|
||||
icons = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_cache_icon_free));
|
||||
|
@ -1075,12 +1077,11 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__,
|
|||
file = ecore_file_file_get(path);
|
||||
if (!file) return;
|
||||
if (!strcmp(file, "desktop_data.update"))
|
||||
{
|
||||
if (cache_check_change(path))
|
||||
{
|
||||
ev = NEW(Efreet_Event_Cache_Update, 1);
|
||||
if (!ev) goto error;
|
||||
|
||||
if (cache_check_change(path))
|
||||
{
|
||||
IF_RELEASE(util_cache_names_key);
|
||||
IF_RELEASE(util_cache_hash_key);
|
||||
|
||||
|
@ -1109,7 +1110,7 @@ cache_update_cb(void *data __UNUSED__, Ecore_File_Monitor *em __UNUSED__,
|
|||
|
||||
ecore_event_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE, ev, desktop_cache_update_free, d);
|
||||
}
|
||||
|
||||
ecore_event_add(EFREET_EVENT_DESKTOP_CACHE_BUILD, NULL, NULL, NULL);
|
||||
/* TODO: Check if desktop_dirs_add exists, and rebuild cache if */
|
||||
}
|
||||
else if (!strcmp(file, "icon_data.update"))
|
||||
|
|
|
@ -31,6 +31,11 @@ EAPI extern int EFREET_DESKTOP_TYPE_DIRECTORY;
|
|||
* be invalidated.
|
||||
*/
|
||||
EAPI extern int EFREET_EVENT_DESKTOP_CACHE_UPDATE;
|
||||
/**
|
||||
* Event id for cache build complete.
|
||||
* @since 1.1.0
|
||||
*/
|
||||
EAPI extern int EFREET_EVENT_DESKTOP_CACHE_BUILD;
|
||||
|
||||
/**
|
||||
* Efreet_Desktop
|
||||
|
|
Loading…
Reference in New Issue