[gedit/libgpe: 11/21] Update python console plugin to work with libgpe.



commit 179fad87cb7ef5c98503f76e7310635093c3d170
Author: Steve Frécinaux <code istique net>
Date:   Sun Nov 1 20:50:35 2009 +0100

    Update python console plugin to work with libgpe.
    
    This is clearly suboptimal, one should probably have a backward-compat
    layer in python to make the old plugins work out of the box...

 plugins/pythonconsole/pythonconsole/__init__.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/plugins/pythonconsole/pythonconsole/__init__.py b/plugins/pythonconsole/pythonconsole/__init__.py
index 995ea1d..397753b 100644
--- a/plugins/pythonconsole/pythonconsole/__init__.py
+++ b/plugins/pythonconsole/pythonconsole/__init__.py
@@ -24,6 +24,7 @@
 # Bits from gedit Python Console Plugin
 #     Copyrignt (C), 2005 Raphaël Slinckx
 
+import gobject
 import gtk
 import gedit
 
@@ -37,7 +38,7 @@ class PythonConsolePlugin(gedit.Plugin):
         gedit.Plugin.__init__(self)
         self.dlg = None
 
-    def activate(self, window):
+    def do_activate(self, window):
         console = PythonConsole(namespace = {'__builtins__' : __builtins__,
                                              'gedit' : gedit,
                                              'window' : window})
@@ -49,17 +50,17 @@ class PythonConsolePlugin(gedit.Plugin):
         bottom.add_item(console, _('Python Console'), image)
         window.set_data('PythonConsolePluginInfo', console)
 
-    def deactivate(self, window):
+    def do_deactivate(self, window):
         console = window.get_data("PythonConsolePluginInfo")
         console.stop()
         window.set_data("PythonConsolePluginInfo", None)
         bottom = window.get_bottom_panel()
         bottom.remove_item(console)
 
-    def is_configurable(self):
+    def do_is_configurable(self):
         return True
 
-    def create_configure_dialog(self):
+    def do_create_configure_dialog(self):
         if not self.dlg:
             self.dlg = PythonConsoleConfigDialog(self.get_data_dir())
 
@@ -70,4 +71,6 @@ class PythonConsolePlugin(gedit.Plugin):
 
         return dialog
 
+gobject.type_register(PythonConsolePlugin)
+
 # ex:et:ts=4:



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