Subject: [E-devel] [Patch] genlist item cache exception handling patch
I added "no cached item" handling.
In some case, items should not be cached and should not use caches.
For example,
if there was a state change in item style, it should not be cached
because it remembers the state changes.
And if we use elm_genlist_item_item_class_update() API,
item should not be cached as well.
It needs to be a fresh item style without remembering the state changes.
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@56585
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
Eina_Bool down : 1;
Eina_Bool dragging : 1;
Eina_Bool updateme : 1;
+ Eina_Bool nocache : 1;
};
struct _Item_Cache
const char *treesize;
char buf[1024];
int depth, tsize = 20;
- Item_Cache *itc;
+ Item_Cache *itc = NULL;
if ((it->realized) || (it->delete_me)) return;
it->order_num_in = in;
- itc = _item_cache_find(it);
+ if (it->nocache)
+ it->nocache = EINA_FALSE;
+ else
+ itc = _item_cache_find(it);
if (itc)
{
it->base.view = itc->base_view;
ecore_timer_del(it->long_timer);
it->long_timer = NULL;
}
- _item_cache_add(it);
+ if (it->nocache)
+ {
+ evas_object_del(it->base.view);
+ it->base.view = NULL;
+ evas_object_del(it->spacer);
+ it->spacer = NULL;
+ }
+ else
+ _item_cache_add(it);
elm_widget_stringlist_free(it->labels);
it->labels = NULL;
elm_widget_stringlist_free(it->icons);
EINA_SAFETY_ON_NULL_RETURN(itc);
if (it->delete_me) return;
it->itc = itc;
+ it->nocache = EINA_TRUE;
elm_genlist_item_update(it);
}