forked from enlightenment/efl
parent
d7864b4d6b
commit
e7107630db
|
@ -21,9 +21,6 @@ TODO
|
|||
- If a theme has several icon types (png, xpm..) prefer the first in the
|
||||
extension list.
|
||||
|
||||
- Make efreet_util optional (the user must init/shutdown in addition to main
|
||||
efreet).
|
||||
|
||||
Notes from the Menu Spec test
|
||||
-----------------------------
|
||||
- We're appending the / to the menu names in the test case. We should
|
||||
|
|
|
@ -25,7 +25,6 @@ efreet_init(void)
|
|||
if (!efreet_ini_init()) return --init;
|
||||
if (!efreet_desktop_init()) return --init;
|
||||
if (!efreet_menu_init()) return --init;
|
||||
if (!efreet_util_init()) return --init;
|
||||
return init;
|
||||
}
|
||||
|
||||
|
@ -39,7 +38,6 @@ int
|
|||
efreet_shutdown(void)
|
||||
{
|
||||
if (--init) return init;
|
||||
efreet_util_shutdown();
|
||||
efreet_menu_shutdown();
|
||||
efreet_desktop_shutdown();
|
||||
efreet_ini_shutdown();
|
||||
|
|
|
@ -181,10 +181,6 @@ const char *efreet_lang_modifier_get(void);
|
|||
|
||||
size_t efreet_array_cat(char *buffer, size_t size, const char *strs[]);
|
||||
|
||||
int efreet_util_init(void);
|
||||
void efreet_util_shutdown(void);
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -79,6 +79,8 @@ static Ecore_Idler *idler = NULL;
|
|||
|
||||
static Ecore_List *monitors = NULL;
|
||||
|
||||
static int init = 0;
|
||||
|
||||
int EFREET_EVENT_DESKTOP_LIST_CHANGE = 0;
|
||||
int EFREET_EVENT_DESKTOP_CHANGE = 0;
|
||||
|
||||
|
@ -88,6 +90,8 @@ efreet_util_init(void)
|
|||
Efreet_Cache_Fill *fill;
|
||||
Ecore_List *dirs;
|
||||
|
||||
if (init++) return init;
|
||||
|
||||
if (!EFREET_EVENT_DESKTOP_LIST_CHANGE)
|
||||
EFREET_EVENT_DESKTOP_LIST_CHANGE = ecore_event_type_new();
|
||||
if (!EFREET_EVENT_DESKTOP_CHANGE)
|
||||
|
@ -124,12 +128,14 @@ efreet_util_init(void)
|
|||
ecore_list_goto_first(fill->dirs);
|
||||
}
|
||||
idler = ecore_idler_add(efreet_util_cache_fill, fill);
|
||||
return 1;
|
||||
return init;
|
||||
}
|
||||
|
||||
void
|
||||
int
|
||||
efreet_util_shutdown(void)
|
||||
{
|
||||
if (--init) return init;
|
||||
|
||||
if (idler)
|
||||
{
|
||||
Efreet_Cache_Fill *fill;
|
||||
|
@ -145,6 +151,7 @@ efreet_util_shutdown(void)
|
|||
IF_FREE_HASH(file_id_by_desktop_path);
|
||||
|
||||
IF_FREE_LIST(monitors);
|
||||
return init;
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
|
@ -31,6 +31,8 @@ Efreet_Desktop *efreet_util_desktop_exec_find(const char *exec);
|
|||
Efreet_Desktop *efreet_util_desktop_name_find(const char *name);
|
||||
Efreet_Desktop *efreet_util_desktop_generic_name_find(const char *generic_name);
|
||||
|
||||
int efreet_util_init(void);
|
||||
int efreet_util_shutdown(void);
|
||||
Ecore_List *efreet_util_desktop_name_glob_list(const char *glob);
|
||||
Ecore_List *efreet_util_desktop_exec_glob_list(const char *glob);
|
||||
Ecore_List *efreet_util_desktop_generic_name_glob_list(const char *glob);
|
||||
|
|
Loading…
Reference in New Issue