simplify _bar_check_for_duplicates() in luncher
This commit is contained in:
parent
79ed10927e
commit
afcf6c6073
|
@ -35,27 +35,12 @@ _bar_aspect(Instance *inst)
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_bar_check_for_duplicates(Icon *ic, E_Client *dupe)
|
_bar_check_for_duplicates(Icon *ic, E_Client *dupe)
|
||||||
{
|
{
|
||||||
Eina_List *l, *ll, *clients = NULL;
|
Eina_List *l;
|
||||||
E_Client *ec;
|
|
||||||
E_Exec_Instance *ex;
|
E_Exec_Instance *ex;
|
||||||
|
|
||||||
EINA_LIST_FOREACH(ic->execs, l, ex)
|
EINA_LIST_FOREACH(ic->execs, l, ex)
|
||||||
{
|
if (eina_list_data_find(ex->clients, dupe)) return EINA_TRUE;
|
||||||
EINA_LIST_FOREACH(ex->clients, ll, ec)
|
return !!eina_list_data_find(ic->clients, dupe);
|
||||||
clients = eina_list_append(clients, ec);
|
|
||||||
}
|
|
||||||
EINA_LIST_FOREACH(ic->clients, l, ec)
|
|
||||||
clients = eina_list_append(clients, ec);
|
|
||||||
|
|
||||||
EINA_LIST_FREE(clients, ec)
|
|
||||||
{
|
|
||||||
if (ec == dupe)
|
|
||||||
{
|
|
||||||
eina_list_free(clients);
|
|
||||||
return EINA_TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return EINA_FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
|
|
Loading…
Reference in New Issue