After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 645687 - Can't access TotemObject from Python plugins
Can't access TotemObject from Python plugins
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: Plugins
2.91.x
Other Linux
: Normal critical
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
[gnome3-important]
Depends on:
Blocks:
 
 
Reported: 2011-03-25 22:22 UTC by Sebastian Pölsterl
Modified: 2011-03-27 04:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Retrieve "object" property containing the TotemObject in do_activate instead of __init__, because in the latter case it would be None. (4.72 KB, patch)
2011-03-26 11:33 UTC, Sebastian Pölsterl
committed Details | Review

Description Sebastian Pölsterl 2011-03-25 22:22:52 UTC
This issue appears for all plugins written in Python, e.g. for the subtitles
plugin:

/opt/gnome3/lib/python2.6/site-packages/gobject/propertyhelper.py:159: Warning:
g_object_set_qdata: assertion `G_IS_OBJECT (object)' failed
  value = instance.get_property(self.name)
Traceback (most recent call last):
  • File "/opt/gnome3/lib64/totem/plugins/opensubtitles/opensubtitles.py", line 318 in do_activate
    self.manager = self.totem.get_ui_manager()
AttributeError: 'NoneType' object has no attribute 'get_ui_manager'

Supposedly this statement does not work as excepted (might be related to the
warning above):
object = gobject.property(type = gobject.GObject)

Not sure if that's a bug in Totem or pygobject.

I've build everything with jhbuild, thus everything is current master.
Comment 1 Sebastian Pölsterl 2011-03-26 10:58:16 UTC
Just checked with Fedora 15, same problem there. In my humble opinion that's a blocker.
Comment 2 Sebastian Pölsterl 2011-03-26 11:33:44 UTC
Created attachment 184281 [details] [review]
Retrieve "object" property containing the TotemObject in do_activate instead of __init__, because in the latter case it would be None.
Comment 3 Bastien Nocera 2011-03-26 12:41:06 UTC
Thanks for the patch Sebastian. Philip will be testing the patch, and requesting freeze break as appropriate today.

Thanks Philip!
Comment 4 Philip Withnall 2011-03-26 17:43:13 UTC
Review of attachment 184281 [details] [review]:

Looks good to me, and seems to work. This brings the behaviour of the Python plugins in line with what the C plugins do, which can never be bad. Please commit if/when we get approval for a code freeze break. I'm asking for one now. Thanks.
Comment 5 Bastien Nocera 2011-03-27 04:20:56 UTC
Comment on attachment 184281 [details] [review]
Retrieve "object" property containing the TotemObject in do_activate instead of __init__, because in the latter case it would be None.

Committed with a fixed up commit message.