always set gadget ids when creating new non-demo gadgets

ensure gadgets aren't pruned on edit end
devs/bu5hm4n/sandbox_fix
Mike Blumenkrantz 5 years ago
parent 4e4dd8b7c0
commit 5f75193054
  1. 3
      src/modules/pager/gadget/pager.c
  2. 3
      src/modules/start/start.c
  3. 3
      src/modules/xkbswitch/gadget/xkbswitch.c

@ -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;

@ -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);

@ -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;

Loading…
Cancel
Save