summaryrefslogtreecommitdiff
path: root/src/plugins/samplepython/samplepython.py
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2011-04-04 23:57:24 +0100
committerPhilip Withnall <philip@tecnocode.co.uk>2011-04-05 01:12:33 +0100
commit22f4325e41242d78c5bc85326a502a7dfe2ac81e (patch)
treee214c65050f746647297416f68bbee0bb50265e3 /src/plugins/samplepython/samplepython.py
parentdb0a8453beb7903083fcf83306fb72afeb8f98fd (diff)
downloadtotem-22f4325e41242d78c5bc85326a502a7dfe2ac81e.tar.gz
plugins: Rename sample-python to samplepython
pylint was complaining about the filename containing a hyphen, so to keep things consistent I renamed the entire plugin. Helps: bgo#645739
Diffstat (limited to 'src/plugins/samplepython/samplepython.py')
-rw-r--r--src/plugins/samplepython/samplepython.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/samplepython/samplepython.py b/src/plugins/samplepython/samplepython.py
new file mode 100644
index 000000000..41db84a8a
--- /dev/null
+++ b/src/plugins/samplepython/samplepython.py
@@ -0,0 +1,15 @@
+# From code by James Livingston
+
+from gi.repository import GObject, Peas, Totem # pylint: disable-msg=E0611
+
+class SamplePython (GObject.Object, Peas.Activatable):
+ __gtype_name__ = 'SamplePython'
+
+ object = GObject.property (type = GObject.Object)
+
+ def do_activate (self):
+ print "Activating sample Python plugin"
+ self.object.action_fullscreen_toggle ()
+
+ def do_deactivate (self):
+ print "Deactivating sample Python plugin"