Call ecore_event_handler_add() in EventHandler's constructor.
authorTilman Sauerbeck <tilman@code-monkey.de>
Sun, 29 Aug 2004 18:37:58 +0000 (18:37 +0000)
committerTilman Sauerbeck <tilman@code-monkey.de>
Sun, 29 Aug 2004 18:37:58 +0000 (18:37 +0000)
We used to call it when the events are defined.

src/ecore/rb_event_handler.c
src/ecore/rb_event_handler.h

index 7d729ae947731fb7752ed1548aaf14de98bbcfca..1edc71d4fdd3da45712a751659fd817cfc4959c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_event_handler.c 79 2004-08-19 22:20:10Z tilman $
+ * $Id: rb_event_handler.c 107 2004-08-29 18:37:58Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -47,6 +47,8 @@ static VALUE c_init (VALUE self, VALUE type)
 
        rb_ary_push (handlers, self);
 
+       ecore_event_handler_add (t, on_ecore_event, NULL);
+
        return self;
 }
 
index c15844ffe3d6f600f9018fc4fcb82d713314fd94..80aa232427348a875d71102b976a35bc483937b5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rb_event_handler.h 86 2004-08-22 13:41:35Z tilman $
+ * $Id: rb_event_handler.h 107 2004-08-29 18:37:58Z tilman $
  *
  * Copyright (C) 2004 ruby-ecore team (see AUTHORS)
  *
@@ -24,8 +24,6 @@
 #define ADD_EVENT(mod, prefix, constname, clsname, obj) \
        rb_define_const ((mod), #constname, \
                         INT2FIX (prefix##constname)); \
-       ecore_event_handler_add (prefix##constname, on_ecore_event, \
-                                NULL); \
 \
        (obj) = rb_define_class_under ((mod), (clsname), cEcoreEvent); \
        rb_define_private_method (rb_singleton_class ((obj)), \