forked from enlightenment/efl
Wait for caches to update, then quit.
SVN revision: 56857
This commit is contained in:
parent
bd1b8e9985
commit
01a9d81096
|
@ -10,6 +10,27 @@ EAPI Eina_List *efreet_util_desktop_generic_name_glob_list(const char *glob);
|
||||||
EAPI Eina_List *efreet_util_desktop_comment_glob_list(const char *glob);
|
EAPI Eina_List *efreet_util_desktop_comment_glob_list(const char *glob);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static Eina_Bool icon_cb = EINA_FALSE;
|
||||||
|
static Eina_Bool desktop_cb = EINA_FALSE;
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
icon_handler_cb(void *data __UNUSED__, int event_type __UNUSED__, void *event __UNUSED__)
|
||||||
|
{
|
||||||
|
icon_cb = EINA_TRUE;
|
||||||
|
if (icon_cb && desktop_cb)
|
||||||
|
ecore_main_loop_quit();
|
||||||
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
desktop_handler_cb(void *data __UNUSED__, int event_type __UNUSED__, void *event __UNUSED__)
|
||||||
|
{
|
||||||
|
desktop_cb = EINA_TRUE;
|
||||||
|
if (icon_cb && desktop_cb)
|
||||||
|
ecore_main_loop_quit();
|
||||||
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check(void)
|
check(void)
|
||||||
{
|
{
|
||||||
|
@ -135,9 +156,16 @@ check(void)
|
||||||
int
|
int
|
||||||
main(int argc __UNUSED__, char **argv __UNUSED__)
|
main(int argc __UNUSED__, char **argv __UNUSED__)
|
||||||
{
|
{
|
||||||
|
Ecore_Event_Handler *icon_handler;
|
||||||
|
Ecore_Event_Handler *desktop_handler;
|
||||||
|
|
||||||
if (!efreet_init()) return 1;
|
if (!efreet_init()) return 1;
|
||||||
|
icon_handler = ecore_event_handler_add(EFREET_EVENT_ICON_CACHE_UPDATE, icon_handler_cb, NULL);
|
||||||
|
desktop_handler = ecore_event_handler_add(EFREET_EVENT_DESKTOP_CACHE_UPDATE, desktop_handler_cb, NULL);
|
||||||
check();
|
check();
|
||||||
ecore_main_loop_begin();
|
ecore_main_loop_begin();
|
||||||
|
ecore_event_handler_del(icon_handler);
|
||||||
|
ecore_event_handler_del(desktop_handler);
|
||||||
efreet_shutdown();
|
efreet_shutdown();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue