during startup ibar keeps re-filling all icons in a tight loop (though still

looping ecore) because efreet's idler keeps scanning icons and issuing change
events for everything. this slows things down a lot and causes ibar to be
inactive for a few seconds because icons are being deleted and re-created. i
have "paused" e_order updates until the first list change - that means the
idle scan cache fetch is over and operation is "normal" again - issue a big
change then anyway and so be up to date, but only on scan completion.


SVN revision: 29455
This commit is contained in:
Carsten Haitzler 2007-04-09 23:12:24 +00:00
parent bc4ff634b9
commit 7eacb34996
2 changed files with 25 additions and 1 deletions

View File

@ -10,6 +10,7 @@ static void _e_order_read (E_Order *eo);
static void _e_order_save (E_Order *eo);
static int _e_order_cb_efreet_desktop_change(void *data, int ev_type, void *ev);
static int _e_order_cb_efreet_desktop_list_change(void *data, int ev_type, void *ev);
static Evas_List *orders = NULL;
static Evas_List *handlers = NULL;
@ -19,6 +20,7 @@ EAPI int
e_order_init(void)
{
handlers = evas_list_append(handlers, ecore_event_handler_add(EFREET_EVENT_DESKTOP_CHANGE, _e_order_cb_efreet_desktop_change, NULL));
handlers = evas_list_append(handlers, ecore_event_handler_add(EFREET_EVENT_DESKTOP_LIST_CHANGE, _e_order_cb_efreet_desktop_list_change, NULL));
return 1;
}
@ -245,6 +247,8 @@ _e_order_save(E_Order *eo)
fclose(f);
}
static int list_changed = 0;
static int
_e_order_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
{
@ -252,6 +256,7 @@ _e_order_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
Evas_List *l;
event = ev;
if (!list_changed) return 1;
switch (event->change)
{
case EFREET_DESKTOP_CHANGE_ADD:
@ -308,3 +313,22 @@ _e_order_cb_efreet_desktop_change(void *data, int ev_type, void *ev)
}
return 1;
}
static int
_e_order_cb_efreet_desktop_list_change(void *data, int ev_type, void *ev)
{
Evas_List *l;
if (!list_changed)
{
list_changed = 1;
for (l = orders; l; l = l->next)
{
E_Order *eo;
eo = l->data;
if (eo->cb.update) eo->cb.update(eo->cb.data, eo);
}
}
return 1;
}

View File

@ -451,7 +451,7 @@ _ibar_config_update(void)
{
Evas_List *l;
Evas_List *i;
for (l = ibar_config->instances; l; l = l->next)
{
Instance *inst;