[totem/introspection: 17/17] Port sample-python plugin to libpeas
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/introspection: 17/17] Port sample-python plugin to libpeas
- Date: Sun, 27 Jun 2010 16:59:40 +0000 (UTC)
commit cfcf946c775172f98984e5c024e02ad71749c7c9
Author: Philip Withnall <philip tecnocode co uk>
Date: Sun Jun 27 16:57:27 2010 +0100
Port sample-python plugin to libpeas
src/plugins/sample-python/sample-python.py | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/src/plugins/sample-python/sample-python.py b/src/plugins/sample-python/sample-python.py
index 5f1f9e0..5b67255 100644
--- a/src/plugins/sample-python/sample-python.py
+++ b/src/plugins/sample-python/sample-python.py
@@ -1,16 +1,15 @@
# From code by James Livingston
-import totem
-import gobject, gtk
+import gobject
+from gi.repository import Peas
+from gi.repository import Totem
-class SamplePython(totem.Plugin):
+class SamplePython(gobject.GObject, Peas.Activatable):
+ __gtype_name__ = 'SamplePython'
- def __init__(self):
- totem.Plugin.__init__(self)
-
- def activate(self, totem):
+ def do_activate(self, totem):
print "Activating sample Python plugin"
totem.action_fullscreen_toggle()
- def deactivate(self, totem):
+ def do_deactivate(self, totem):
print "Deactivating sample Python plugin"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]