gedit r6515 - in trunk: . plugins/pythonconsole/pythonconsole
- From: pborelli svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6515 - in trunk: . plugins/pythonconsole/pythonconsole
- Date: Mon, 8 Sep 2008 10:29:05 +0000 (UTC)
Author: pborelli
Date: Mon Sep 8 10:29:05 2008
New Revision: 6515
URL: http://svn.gnome.org/viewvc/gedit?rev=6515&view=rev
Log:
2008-09-08 Paolo Borelli <pborelli katamail com>
* plugins/pythonconsole/__init__.py:
* plugins/pythonconsole/console.py:
do not hold a ref to GeditWindow when deactivating. Patch by
Jesse van den Kieboom.
Modified:
trunk/ChangeLog
trunk/plugins/pythonconsole/pythonconsole/__init__.py
trunk/plugins/pythonconsole/pythonconsole/console.py
Modified: trunk/plugins/pythonconsole/pythonconsole/__init__.py
==============================================================================
--- trunk/plugins/pythonconsole/pythonconsole/__init__.py (original)
+++ trunk/plugins/pythonconsole/pythonconsole/__init__.py Mon Sep 8 10:29:05 2008
@@ -31,7 +31,7 @@
class PythonConsolePlugin(gedit.Plugin):
def __init__(self):
gedit.Plugin.__init__(self)
-
+
def activate(self, window):
console = PythonConsole(namespace = {'__builtins__' : __builtins__,
'gedit' : gedit,
@@ -44,9 +44,11 @@
gtk.ICON_SIZE_MENU)
bottom.add_item(console, _('Python Console'), image)
window.set_data('PythonConsolePluginInfo', console)
-
+
def deactivate(self, window):
console = window.get_data("PythonConsolePluginInfo")
+ console.stop()
window.set_data("PythonConsolePluginInfo", None)
bottom = window.get_bottom_panel()
bottom.remove_item(console)
+
Modified: trunk/plugins/pythonconsole/pythonconsole/console.py
==============================================================================
--- trunk/plugins/pythonconsole/pythonconsole/console.py (original)
+++ trunk/plugins/pythonconsole/pythonconsole/console.py Mon Sep 8 10:29:05 2008
@@ -78,7 +78,9 @@
self.view.connect("key-press-event", self.__key_press_event_cb)
buffer.connect("mark-set", self.__mark_set_cb)
-
+ def stop(self):
+ self.namespace = None
+
def __key_press_event_cb(self, view, event):
if event.keyval == gtk.keysyms.d and event.state == gtk.gdk.CONTROL_MASK:
self.destroy()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]