Revert "entrance: sent the pools via the new method and use the new functions"

This reverts commit 778a8a2d0c.
This commit is contained in:
Marcel Hollerbach 2014-05-14 17:15:55 +02:00
parent b01528c8a6
commit a838399e24
3 changed files with 8 additions and 6 deletions

View File

@ -345,7 +345,7 @@ _entrance_conf_user_build_cb(Evas_Object *t, Entrance_Login *eu)
IMG_LIST_FORK(entrance_gui_background_pool_get(), l);
IMG_LIST_FORK(entrance_gui_background_pool_get(), l);
IMG_LIST_FORK(entrance_gui_theme_backgrounds(), l);
IMG_LIST_FORK(entrance_gui_user_background_pool_get(eu->login), l);
IMG_LIST_FORK(eu->background_pool, l);
entrance_fill(gl, entrance_conf_background_fill_get(),
l, _entrance_conf_user_bg_fill_cb,
_entrance_conf_user_bg_sel, o);
@ -383,7 +383,7 @@ _entrance_conf_user_build_cb(Evas_Object *t, Entrance_Login *eu)
l = eina_list_append(NULL, img);
IMG_LIST_FORK(entrance_gui_icon_pool_get(), l);
IMG_LIST_FORK(entrance_gui_theme_icons(), l);
IMG_LIST_FORK(entrance_gui_user_icon_pool_get(eu->login), l);
IMG_LIST_FORK(eu->icon_pool, l);
entrance_fill(gl, entrance_conf_background_fill_get(),
l, _entrance_conf_user_icon_fill_cb,
_entrance_conf_user_icon_sel, o);

View File

@ -698,16 +698,19 @@ _entrance_gui_user_icon_random_get(Evas_Object *obj, const char *username)
unsigned int rnd = 0;
Evas_Object *o = NULL;
Entrance_Image *img;
const Entrance_Login *el;
Eina_List *user_icons = NULL, *sys_icons = NULL, *theme_icons = NULL;
user_icons = entrance_gui_user_icon_pool_get(username);
el = entrance_gui_user_get(username);
if (el)
user_icons = el->icon_pool;
sys_icons = entrance_gui_icon_pool_get();
theme_icons = entrance_gui_theme_icons();
srand(time(NULL));
rnd = (((eina_list_count(user_icons) + eina_list_count(sys_icons) + eina_list_count(theme_icons))
* (double)rand()) / (RAND_MAX + 1.0));
if ((rnd < eina_list_count(user_icons)))
if ((el) && (rnd < eina_list_count(user_icons)))
{
o = elm_icon_add(obj);
img = eina_list_nth(user_icons, rnd);

View File

@ -45,9 +45,8 @@ _entrance_server_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event E
eev.type = ENTRANCE_EVENT_POOLS;
eev.event.pools.icon_pool = entrance_image_system_icons();
eev.event.pools.background_pool = entrance_image_system_backgrounds();
eev.event.pools.user_pools = entrance_image_user_pool_get(entrance_history_get());
eev.event.pools.user_pools = NULL;
entrance_event_send(&eev);
entrance_image_user_pool_free(eev.event.pools.user_pools);
return ECORE_CALLBACK_RENEW;
}