[Rhythmbox-devel] python plugin source error



Hi,

I am trying to write my first plugin for Rhythmbox. I am new to GTK and Python as well so this is a learning exercise.

At home, all my music is on a DAAP server on the network, so what I want to happen is for Rhythmbox to automatically select the server and start loading song data when I start it, without me having to go click on the server source.

So far this is all the code of my plugin:

import rb
class AutostartPlugin (rb.Plugin):
   def __init__(self):
       rb.Plugin.__init__(self)

   def activate(self, shell):
       slm = shell.get_property("sourcelist-model")
       slm.foreach(self.row_changed)
       slm.connect("row-changed", self.row_changed)
def row_changed(self, treemodel, path, iter, user_data=None):
       o = treemodel.get_value(iter, 3)

When it tries to run the line
       o = treemodel.get_value(iter, 3)
which I think should get the RBSource object from the current row of the SourceList that it is looking at, I get this error:

TypeError: Cannot create a consistent method resolution
order (MRO) for bases ImplementorIface, gtk.Orientable, Buildable
**
ERROR:/build/buildd/pygobject-2.16.1/gobject/pygobject.c:925:pygobject_new_full: assertion failed: (tp != NULL)
Aborted

Is this because my code is doing something bad? Or a bug in Rhythmbox? Or somewhere in GTK?

I'm running Ubuntu 9.04 64 bit, which has Rhythmbox version 0.12.0-0ubuntu4, libgtk2 version 2.16.1-0ubuntu2, python-gtk2 version 2.14.1-1ubuntu1

thanks for any suggestions
Edward


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