Fix Config call for current container. Better trapping

SVN revision: 19425
This commit is contained in:
Christopher Michael 2005-12-30 14:10:35 +00:00
parent 8e0ee56223
commit acb5e591ce
1 changed files with 12 additions and 4 deletions

View File

@ -137,14 +137,22 @@ int
e_modapi_config(E_Module *m)
{
Battery *e;
Battery_Face *face;
Evas_List *l;
e = m->data;
if (!e) return 0;
if (!e->faces) return 0;
face = e->faces->data;
if (!face) return 0;
_config_battery_module(face->con, face->battery);
for (l = e->faces; l; l = l->next)
{
Battery_Face *face;
face = l->data;
if (!face) return 0;
if (face->con == e_container_current_get(e_manager_current_get()))
{
_config_battery_module(face->con, face->battery);
break;
}
}
return 1;
}