Implementing a custom signal with PyGObject

2012-07-06 Thread Moritz Renftle
hi!

i'm trying to create a custom signal for a file-selection-button, code
is here: http://bpaste.net/show/DZwtKCPDBcpCv0g0NQCn/

the problem:
when the signal is emitted in the image_selection-method, it doesn't
call the connected signal handler, if this handler is not within the
same class. but if i connect the signal with a method in the same class,
it works.

is this a pygi-related bug or am i doing something wrong?

thanks in advance,
moritz

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Implementing a custom signal with PyGObject

2012-07-06 Thread Simon Feltman
Hi Moritz,
A good thing to do would be to pair your example down into something
runnable from a console without any dependencies except GObject and Gtk if
possible. Anyone helping will have to do this anyway in order to observe
the problem. However, something that immediately stuck out in the code, and
I'm not sure if it's a problem, is deriving from both Gtk.Button and
GObject.GObject. I don't think this is needed because GObject is already a
parent class of Gtk.Button.

-Simon

On Fri, Jul 6, 2012 at 9:26 AM, Moritz Renftle wrote:

> hi!
>
> i'm trying to create a custom signal for a file-selection-button, code
> is here: http://bpaste.net/show/DZwtKCPDBcpCv0g0NQCn/
>
> the problem:
> when the signal is emitted in the image_selection-method, it doesn't
> call the connected signal handler, if this handler is not within the
> same class. but if i connect the signal with a method in the same class,
> it works.
>
> is this a pygi-related bug or am i doing something wrong?
>
> thanks in advance,
> moritz
>
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Implementing a custom signal with PyGObject

2012-07-07 Thread Moritz Renftle
Hi Simon,

the problem was actually in my code and not in GObject or Gtk, what i
posted is working.
thanks for pointing out the problem of multiple inheritance from GObject
and Gtk.Button, it was just a try to see if it changes anything.

thank you,
moritz

Am Freitag, den 06.07.2012, 14:59 -0700 schrieb Simon Feltman:
> Hi Moritz,
> A good thing to do would be to pair your example down into something
> runnable from a console without any dependencies except GObject and
> Gtk if possible. Anyone helping will have to do this anyway in order
> to observe the problem. However, something that immediately stuck out
> in the code, and I'm not sure if it's a problem, is deriving from both
> Gtk.Button and GObject.GObject. I don't think this is needed because
> GObject is already a parent class of Gtk.Button.
> 
> 
> -Simon
> 
> On Fri, Jul 6, 2012 at 9:26 AM, Moritz Renftle
>  wrote:
> hi!
> 
> i'm trying to create a custom signal for a
> file-selection-button, code
> is here: http://bpaste.net/show/DZwtKCPDBcpCv0g0NQCn/
> 
> the problem:
> when the signal is emitted in the image_selection-method, it
> doesn't
> call the connected signal handler, if this handler is not
> within the
> same class. but if i connect the signal with a method in the
> same class,
> it works.
> 
> is this a pygi-related bug or am i doing something wrong?
> 
> thanks in advance,
> moritz
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> 
> 


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list