[gedit-plugins] [commander] Do not override destroy
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] [commander] Do not override destroy
- Date: Mon, 8 Sep 2014 14:21:59 +0000 (UTC)
commit 988a636ab22f92c4e41caa02835b69a4c68461aa
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Mon Sep 8 16:21:33 2014 +0200
[commander] Do not override destroy
It has somehow weird issues being called after the py object has
already disappeared?
plugins/commander/commander/entry.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/plugins/commander/commander/entry.py b/plugins/commander/commander/entry.py
index 9f98776..e667514 100644
--- a/plugins/commander/commander/entry.py
+++ b/plugins/commander/commander/entry.py
@@ -77,6 +77,8 @@ class Entry(Gtk.Box):
self._re_complete = re.compile('("((?:\\\\"|[^"])*)"?|\'((?:\\\\\'|[^\'])*)\'?|[^\s]+)')
self._command_state = commands.Commands.State()
+ self.connect('destroy', self._on_destroy)
+
self._build_ui()
self._setup_keybindings()
@@ -767,13 +769,14 @@ GtkEntry#gedit-commander-entry {
return ret
- def do_destroy(self):
+ def _on_destroy(self, widget):
+ # Note we do this not as an override because somehow something
+ # goes wrong when finalizing in that case, maybe self is NULL
+ # or something like that, and then gets some new empty instance?
self._view.disconnect(self._view_style_updated_id)
self._history.save()
self._view = None
- Gtk.Box.do_destroy(self)
-
# vi:ex:ts=4:et
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]