always set gadget ids when creating new non-demo gadgets

ensure gadgets aren't pruned on edit end
This commit is contained in:
Mike Blumenkrantz 2017-09-01 13:40:12 -04:00
parent 4e4dd8b7c0
commit 5f75193054
3 changed files with 6 additions and 3 deletions

View File

@ -2959,12 +2959,13 @@ pager_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
}
EINTERN Evas_Object *
pager_create(Evas_Object *parent, int *id EINA_UNUSED, E_Gadget_Site_Orient orient EINA_UNUSED)
pager_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient EINA_UNUSED)
{
Pager *p;
Evas_Object *o;
Instance *inst;
if (*id == 0) *id = 1;
inst = E_NEW(Instance, 1);
p = _pager_new(evas_object_evas_get(parent), EINA_FALSE);
p->inst = inst;

View File

@ -195,12 +195,13 @@ _gadget_created(void *data, Evas_Object *obj, void *event_info)
}
EINTERN Evas_Object *
start_create(Evas_Object *parent, int *id EINA_UNUSED, E_Gadget_Site_Orient orient)
start_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient)
{
Evas_Object *o;
Instance *inst;
if (e_gadget_site_is_desklock(parent)) return NULL;
if (*id == 0) *id = 1;
inst = E_NEW(Instance, 1);
o = elm_layout_add(parent);

View File

@ -275,10 +275,11 @@ xkbg_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
}
EINTERN Evas_Object *
xkbg_gadget_create(Evas_Object *parent, int *id EINA_UNUSED, E_Gadget_Site_Orient orient)
xkbg_gadget_create(Evas_Object *parent, int *id, E_Gadget_Site_Orient orient)
{
Instance *inst;
if (*id == 0) *id = 1;
inst = E_NEW(Instance, 1);
inst->o_main = elm_box_add(parent);
inst->orient = orient;