[totem] plugins: Add an __init__ to the samplepython plugin and spice it up a bit



commit d8704a0ff1cf0af37ebeb686362241b596f512b1
Author: Philip Withnall <philip tecnocode co uk>
Date:   Mon Apr 4 23:59:44 2011 +0100

    plugins: Add an __init__ to the samplepython plugin and spice it up a bit
    
    Now it irritatingly toggles fullscreen mode when being deactivated, as well
    as when being activated!
    
    Helps: bgo#645739

 src/plugins/samplepython/samplepython.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/samplepython/samplepython.py b/src/plugins/samplepython/samplepython.py
index 41db84a..0630328 100644
--- a/src/plugins/samplepython/samplepython.py
+++ b/src/plugins/samplepython/samplepython.py
@@ -1,15 +1,19 @@
 # From code by James Livingston
 
-from gi.repository import GObject, Peas, Totem # pylint: disable-msg=E0611
+from gi.repository import GObject, Peas, Totem # pylint: disable-msg=E0611,W0611
 
 class SamplePython (GObject.Object, Peas.Activatable):
     __gtype_name__ = 'SamplePython'
 
     object = GObject.property (type = GObject.Object)
 
+    def __init__ (self):
+        GObject.Object.__init__ (self)
+
     def do_activate (self):
         print "Activating sample Python plugin"
         self.object.action_fullscreen_toggle ()
 
     def do_deactivate (self):
         print "Deactivating sample Python plugin"
+        self.object.action_fullscreen_toggle ()



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