Updated Finnish translation
[rhythmbox.git] / plugins / sample-python / sample-python.py
blob6f2a459b11437161af1dc28b4959437cf198bb76
1 import rhythmdb, rb
2 import gobject, gtk
4 class SamplePython(rb.Plugin):
6 def __init__(self):
7 rb.Plugin.__init__(self)
9 def activate(self, shell):
10 print "activating sample python plugin"
12 db = shell.get_property("db")
13 model = db.query_model_new_empty()
14 self.source = gobject.new (PythonSource, shell=shell, name=_("Python Source"), query_model=model)
15 shell.append_source(self.source, None)
17 def deactivate(self, shell):
18 print "deactivating sample python plugin"
19 self.source.delete_thyself()
20 self.source = None
23 class PythonSource(rb.Source):
24 def __init__(self):
25 rb.Source.__init__(self)
27 gobject.type_register(PythonSource)