GNOME Bugzilla – Bug 686496
signal decorator fails with "selection_changed" signal
Last modified: 2012-10-20 09:59:22 UTC
If I try to register a "selection_changed" signal on an object that's not an iconview, but I also have an IconView subclass (see testcase), I get the following error /opt/gnome/lib64/python2.7/site-packages/gi/_gobject/__init__.py:280: Warning: gsignal.c:1627: signal "selection_changed" already exists in the `GtkIconView' class ancestry
Created attachment 226854 [details] testcase
Confirmed. The problem looks to be with signalhelper.py:install_signals where it uses: gsignals = getattr(cls, '__gsignals__', {}) Using getattr here will pull in these defs from base class if the class variable is not defined and re-assign them to the current class going through the meta class. Interestingly this code was based on the property helper install_properties so I wonder if Properties will exhibit the behavior with a similar setup. In any case I will look into a fix for this a little later tonight and cherry pick it for pygobject 3.4.
Created attachment 226878 [details] [review] Fix Signal decorator to not use base class gsignals dict Fix install_signals to not use the parent classes __gsignals__ dict if one does not exist on the given class.