From 9a5514c6e41afbddd91935448f24fdf94597a86b Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Wed, 14 May 2014 16:25:38 +0200 Subject: [PATCH] entrance: added new functions to access the user pools --- src/bin/entrance_gui.c | 26 ++++++++++++++++++++++++++ src/bin/entrance_gui.h | 2 ++ 2 files changed, 28 insertions(+) diff --git a/src/bin/entrance_gui.c b/src/bin/entrance_gui.c index eb6260e..bf0c800 100644 --- a/src/bin/entrance_gui.c +++ b/src/bin/entrance_gui.c @@ -491,6 +491,32 @@ entrance_gui_conf_set(const Entrance_Conf_Gui_Event *conf) _gui->changed = ~(ENTRANCE_CONF_NONE); _entrance_gui_update(); } +static Entrance_User_Pool* +_entrance_gui_user_pool_get(const char *name) +{ + Eina_List *node; + Entrance_User_Pool *pool; + EINA_LIST_FOREACH(_gui->user_pools, node, pool) + { + if (!strcmp(pool->name, name)) + { + return pool; + } + } + return NULL; +} + +Eina_List* +entrance_gui_user_icon_pool_get(const char *name) +{ + return _entrance_gui_user_pool_get(name)->icon_pool; +} + +Eina_List* +entrance_gui_user_background_pool_get(const char *name) +{ + return _entrance_gui_user_pool_get(name)->background_pool; +} void entrance_gui_pools_set(const Entrance_Pools *pool) diff --git a/src/bin/entrance_gui.h b/src/bin/entrance_gui.h index 61fdf30..75d2e23 100644 --- a/src/bin/entrance_gui.h +++ b/src/bin/entrance_gui.h @@ -31,6 +31,8 @@ void entrance_gui_user_bg_set(const char *path, const char *group); Eina_List* entrance_gui_background_pool_get(void); Eina_List* entrance_gui_icon_pool_get(void); void entrance_gui_pools_set(const Entrance_Pools *pool); +Eina_List* entrance_gui_user_icon_pool_get(const char *name); +Eina_List* entrance_gui_user_background_pool_get(const char *name); /* char *entrance_gui_user_get();