entrance: sent the pools via the new method and use the new functions
This commit is contained in:
parent
9a5514c6e4
commit
778a8a2d0c
|
@ -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(eu->background_pool, l);
|
||||
IMG_LIST_FORK(entrance_gui_user_background_pool_get(eu->login), 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(eu->icon_pool, l);
|
||||
IMG_LIST_FORK(entrance_gui_user_icon_pool_get(eu->login), l);
|
||||
entrance_fill(gl, entrance_conf_background_fill_get(),
|
||||
l, _entrance_conf_user_icon_fill_cb,
|
||||
_entrance_conf_user_icon_sel, o);
|
||||
|
|
|
@ -724,19 +724,16 @@ _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;
|
||||
|
||||
el = entrance_gui_user_get(username);
|
||||
if (el)
|
||||
user_icons = el->icon_pool;
|
||||
user_icons = entrance_gui_user_icon_pool_get(username);
|
||||
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 ((el) && (rnd < eina_list_count(user_icons)))
|
||||
if ((rnd < eina_list_count(user_icons)))
|
||||
{
|
||||
o = elm_icon_add(obj);
|
||||
img = eina_list_nth(user_icons, rnd);
|
||||
|
|
|
@ -45,8 +45,9 @@ _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 = NULL;
|
||||
eev.event.pools.user_pools = entrance_image_user_pool_get(entrance_history_get());
|
||||
entrance_event_send(&eev);
|
||||
entrance_image_user_pool_free(eev.event.pools.user_pools);
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue