Fwd: registering Gtk.EventButton as argument to custom signal





Hello,

I'm trying to port my open source
(https://bitbucket.org/thekswenson/alpha) GTK 2 code to GTK 3.

A have defined a custom signal as follows:

__gsignals__ = {'clicked' : (GObject.SignalFlags.RUN_LAST, None,
                             (GObject.TYPE_STRING, Gdk.Event))}


I later emit this signal:

self.emit('clicked', None, event)

where "event" is a Gdk.EventButton.

This code worked under GTK 2 but apparently an EventButton is not an
Event anymore.  I've tried registering the event with Gdk.EventButton
instead of Gdk.Event but I get an error:

...
/usr/lib/python2.7/dist-packages/gi/types.py:205: Warning:
/build/glib2.0-t9oPgV/glib2.0-
2.48.0/./gobject/gsignal.c:1674:
parameter 2 of type 'void' for signal "xdot+DotWidget::clicked" is not
a value type
  _gobject.type_register(cls, namespace.get('__gtype_name__'
))
...

Any chance somebody could explain to me what's going on here?

I appreciate the help, thank you.

kms



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]