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_ICON_CACHE_UPDATE = 0;
|
||||||
EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0;
|
EAPI int EFREET_EVENT_DESKTOP_CACHE_UPDATE = 0;
|
||||||
|
EAPI int EFREET_EVENT_DESKTOP_CACHE_BUILD = 0;
|
||||||
|
|
||||||
int
|
int
|
||||||
efreet_cache_init(void)
|
efreet_cache_init(void)
|
||||||
|
@ -126,6 +127,7 @@ efreet_cache_init(void)
|
||||||
|
|
||||||
EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new();
|
EFREET_EVENT_ICON_CACHE_UPDATE = ecore_event_type_new();
|
||||||
EFREET_EVENT_DESKTOP_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));
|
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));
|
icons = eina_hash_string_superfast_new(EINA_FREE_CB(efreet_cache_icon_free));
|
||||||
|
@ -1076,11 +1078,10 @@ 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;
|
||||||
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);
|
||||||
|
|
||||||
|
@ -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_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 */
|
/* 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"))
|
||||||
|
|
|
@ -31,6 +31,11 @@ EAPI extern int EFREET_DESKTOP_TYPE_DIRECTORY;
|
||||||
* be invalidated.
|
* be invalidated.
|
||||||
*/
|
*/
|
||||||
EAPI extern int EFREET_EVENT_DESKTOP_CACHE_UPDATE;
|
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
|
* Efreet_Desktop
|
||||||
|
|
Loading…
Reference in New Issue