e ibar/ibox fix starrting/started signal emittion
i found this didn't emit signals correctly and multiple times when not needed. this fixes that. @fix
This commit is contained in:
parent
382fe30688
commit
c72113eca8
|
@ -90,6 +90,7 @@ struct _IBar_Icon
|
||||||
Eina_Bool focused : 1;
|
Eina_Bool focused : 1;
|
||||||
Eina_Bool not_in_order : 1;
|
Eina_Bool not_in_order : 1;
|
||||||
Eina_Bool menu_grabbed : 1;
|
Eina_Bool menu_grabbed : 1;
|
||||||
|
Eina_Bool starting : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
static IBar *_ibar_new(Evas_Object *parent, Instance *inst);
|
static IBar *_ibar_new(Evas_Object *parent, Instance *inst);
|
||||||
|
@ -1736,7 +1737,8 @@ _ibar_instance_watch(void *data, E_Exec_Instance *inst, E_Exec_Watch_Type type)
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case E_EXEC_WATCH_STARTED:
|
case E_EXEC_WATCH_STARTED:
|
||||||
_ibar_icon_signal_emit(ic, "e,state,started", "e");
|
if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e");
|
||||||
|
ic->starting = EINA_FALSE;
|
||||||
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
||||||
if (ic->exe_inst == inst) ic->exe_inst = NULL;
|
if (ic->exe_inst == inst) ic->exe_inst = NULL;
|
||||||
if (!eina_list_data_find(ic->exes, inst))
|
if (!eina_list_data_find(ic->exes, inst))
|
||||||
|
@ -1789,7 +1791,8 @@ _ibar_icon_go(IBar_Icon *ic, Eina_Bool keep_going)
|
||||||
{
|
{
|
||||||
ic->exe_inst = einst;
|
ic->exe_inst = einst;
|
||||||
e_exec_instance_watcher_add(einst, _ibar_instance_watch, ic);
|
e_exec_instance_watcher_add(einst, _ibar_instance_watch, ic);
|
||||||
_ibar_icon_signal_emit(ic, "e,state,starting", "e");
|
if (!ic->starting) _ibar_icon_signal_emit(ic, "e,state,starting", "e");
|
||||||
|
ic->starting = EINA_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2606,7 +2609,8 @@ _ibar_cb_client_prop(void *d EINA_UNUSED, int t EINA_UNUSED, E_Event_Client_Prop
|
||||||
{
|
{
|
||||||
if (ic)
|
if (ic)
|
||||||
{
|
{
|
||||||
_ibar_icon_signal_emit(ic, "e,state,started", "e");
|
if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e");
|
||||||
|
ic->starting = EINA_FALSE;
|
||||||
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
||||||
if (!eina_list_data_find(ic->exes, ev->ec->exe_inst))
|
if (!eina_list_data_find(ic->exes, ev->ec->exe_inst))
|
||||||
ic->exes = eina_list_append(ic->exes, ev->ec->exe_inst);
|
ic->exes = eina_list_append(ic->exes, ev->ec->exe_inst);
|
||||||
|
@ -2655,7 +2659,8 @@ _ibar_cb_exec_del(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance *exe)
|
||||||
ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop));
|
ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop));
|
||||||
if (ic)
|
if (ic)
|
||||||
{
|
{
|
||||||
_ibar_icon_signal_emit(ic, "e,state,started", "e");
|
if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e");
|
||||||
|
ic->starting = EINA_FALSE;
|
||||||
ic->exes = eina_list_remove(ic->exes, exe);
|
ic->exes = eina_list_remove(ic->exes, exe);
|
||||||
if (ic->exe_inst == exe) ic->exe_inst = NULL;
|
if (ic->exe_inst == exe) ic->exe_inst = NULL;
|
||||||
if (!ic->exes)
|
if (!ic->exes)
|
||||||
|
@ -2696,7 +2701,8 @@ _ibar_cb_exec_new_client(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance
|
||||||
ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop));
|
ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop));
|
||||||
if (ic)
|
if (ic)
|
||||||
{
|
{
|
||||||
_ibar_icon_signal_emit(ic, "e,state,started", "e");
|
if (ic->starting) _ibar_icon_signal_emit(ic, "e,state,started", "e");
|
||||||
|
ic->starting = EINA_FALSE;
|
||||||
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
||||||
if (skip) continue;
|
if (skip) continue;
|
||||||
if (!eina_list_data_find(ic->exes, exe))
|
if (!eina_list_data_find(ic->exes, exe))
|
||||||
|
@ -2742,7 +2748,6 @@ _ibar_cb_exec_new(void *d EINA_UNUSED, int t EINA_UNUSED, E_Exec_Instance *exe)
|
||||||
ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop));
|
ic = eina_hash_find(b->icon_hash, _desktop_name_get(exe->desktop));
|
||||||
if (ic)
|
if (ic)
|
||||||
{
|
{
|
||||||
_ibar_icon_signal_emit(ic, "e,state,started", "e");
|
|
||||||
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
if (!ic->exes) _ibar_icon_signal_emit(ic, "e,state,on", "e");
|
||||||
if (skip) continue;
|
if (skip) continue;
|
||||||
if (!eina_list_data_find(ic->exes, exe))
|
if (!eina_list_data_find(ic->exes, exe))
|
||||||
|
|
Loading…
Reference in New Issue