[rhythmbox] Port sample python plugin to GI
- From: Jonathan Matthew <jmatthew src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rhythmbox] Port sample python plugin to GI
- Date: Fri, 4 Feb 2011 13:11:24 +0000 (UTC)
commit b6a7917c3b31de43757cf60c3fddb73be510db8d
Author: Jonathan Matthew <jonathan d14n org>
Date: Fri Feb 4 23:04:37 2011 +1000
Port sample python plugin to GI
plugins/sample-python/sample-python.py | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/plugins/sample-python/sample-python.py b/plugins/sample-python/sample-python.py
index 6f2a459..4db47f2 100644
--- a/plugins/sample-python/sample-python.py
+++ b/plugins/sample-python/sample-python.py
@@ -1,10 +1,12 @@
-import rhythmdb, rb
-import gobject, gtk
-class SamplePython(rb.Plugin):
+import gobject
+import rb
+from gi.repository import RB
+
+class SamplePython(RB.Plugin):
def __init__(self):
- rb.Plugin.__init__(self)
+ RB.Plugin.__init__(self)
def activate(self, shell):
print "activating sample python plugin"
@@ -20,8 +22,8 @@ class SamplePython(rb.Plugin):
self.source = None
-class PythonSource(rb.Source):
+class PythonSource(RB.Source):
def __init__(self):
- rb.Source.__init__(self)
+ RB.Source.__init__(self)
gobject.type_register(PythonSource)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]