On Saturday 02 May 2009 19:26:00 Gustavo Sverzut Barbieri wrote:
> On Sat, May 2, 2009 at 1:28 PM, pieterg <piet...@gmx.com> wrote:
> > How about if we allow the use of "group:signal" as signal name?
> > I've implemented this as a test, and it works like expected.
>
> I don't know if it would break things, possibly you better do check if
> there is a part with that id and it is GROUP in order to avoid
> breaking existing apps that may use ":" in the name.
OK, good point. So something like this perhaps?
Index: edje/src/lib/edje_program.c
===================================================================
--- edje/src/lib/edje_program.c (revision 40487)
+++ edje/src/lib/edje_program.c (working copy)
@@ -816,6 +816,40 @@
Evas_Object *obj;
if (ed->delete_me) return;
+
+ if (strchr(sig, ':'))
+ {
+ /* the signal contains a colon, split the signal into "group:signal", and deliver it to "group" */
+ int i;
+ char *splitsig = strdup(sig);
+ char *group = splitsig;
+ char *colon = strchr(splitsig, ':');
+ char *newsig;
+ if (colon)
+ {
+ *colon = '\0';
+ newsig = colon + 1;
+ 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
+ && rp->part
+ && rp->part->source
+ && !strcmp(rp->part->source, group))
+ {
+ Edje *ed2 = _edje_fetch(rp->swallowed_object);
+ if (ed2) _edje_emit(ed2, newsig, src);
+ free(splitsig);
+ return;
+ }
+ }
+ }
+ /* we have no group by that name, continue delivering the signal to our own group */
+ free(splitsig);
+ }
+
emsg.sig = sig;
emsg.src = src;
_edje_message_send(ed, EDJE_QUEUE_SCRIPT, EDJE_MESSAGE_SIGNAL, 0, &emsg);
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel