e-modules: use GADCON_CLIENT_CONFIG_GET

SVN revision: 63126
This commit is contained in:
Hannes Janetzek 2011-09-03 15:02:34 +00:00
parent cfc96085f6
commit c200da742c
1 changed files with 3 additions and 18 deletions

View File

@ -24,7 +24,6 @@ static void _places_cb_menu_post(void *data, E_Menu *menu);
static void _places_cb_menu_configure(void *data, E_Menu *mn, E_Menu_Item *mi);
/* Local Variables */
static int uuid = 0;
static E_Config_DD *conf_edd = NULL;
static E_Config_DD *conf_item_edd = NULL;
Eina_List *instances = NULL;
@ -377,24 +376,10 @@ _places_conf_timer(void *data)
static Config_Item *
_places_conf_item_get(const char *id)
{
Eina_List *l = NULL;
Config_Item *ci = NULL;
char buf[128];
Config_Item *ci;
GADCON_CLIENT_CONFIG_GET(Config_Item, places_conf->conf_items, _gc_class, id);
if (!id)
{
/* nothing passed, return a new id */
snprintf(buf, sizeof(buf), "%s.%d", _gc_class.name, ++uuid);
id = buf;
}
else
{
for (l = places_conf->conf_items; l; l = l->next)
{
if (!(ci = l->data)) continue;
if ((ci->id) && (!strcmp(ci->id, id))) return ci;
}
}
ci = E_NEW(Config_Item, 1);
ci->id = eina_stringshare_add(id);
ci->switch2 = 0;