capture zone for newly-added bryces based on name

the last number is always the zone number
This commit is contained in:
Mike Blumenkrantz 2017-08-15 11:13:12 -04:00
parent 7d2fdfa880
commit 8545fc08be
1 changed files with 3 additions and 0 deletions

View File

@ -1033,10 +1033,13 @@ E_API Evas_Object *
e_bryce_add(Evas_Object *parent, const char *name, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor an)
{
Bryce *b;
const char *z;
b = E_NEW(Bryce, 1);
b->size = 48;
b->name = eina_stringshare_add(name);
z = strrchr(name, '_');
b->zone = strtoul(z + 1, NULL, 10);
b->anchor = an;
b->orient = orient;
b->layer = DEFAULT_LAYER;