forked from enlightenment/efl
From: Hugo Camboulive <hugo.camboulive@gmail.com>
Subject: [E-devel] [E-Devel] [Patch] Edje Message - add the callback recursively When you send a message from an edje subgroup (part { type: GROUP ...}), the message callback isn't called because it tries to reach ed->message.func, which is only defined for the top edje part. This patches adds the callback and data to all the subgroups recursively. SVN revision: 50538
This commit is contained in:
parent
a6b33190b0
commit
e4b874d3c4
|
@ -211,8 +211,19 @@ _edje_message_shutdown(void)
|
||||||
void
|
void
|
||||||
_edje_message_cb_set(Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data)
|
_edje_message_cb_set(Edje *ed, void (*func) (void *data, Evas_Object *obj, Edje_Message_Type type, int id, void *msg), void *data)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
ed->message.func = func;
|
ed->message.func = func;
|
||||||
ed->message.data = data;
|
ed->message.data = data;
|
||||||
|
for (i = 0 ; i < ed->table_parts_size ; i++) {
|
||||||
|
Edje_Real_Part *rp;
|
||||||
|
rp = ed->table_parts[i];
|
||||||
|
if (rp->part->type == EDJE_PART_TYPE_GROUP && rp->swallowed_object) {
|
||||||
|
Edje *edj2 = _edje_fetch(rp->swallowed_object);
|
||||||
|
if (!edj2) continue;
|
||||||
|
_edje_message_cb_set(edj2, func, data);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Edje_Message *
|
Edje_Message *
|
||||||
|
|
Loading…
Reference in New Issue