From b79cab04739d6896f62e8257a0155b9c2a1193ce Mon Sep 17 00:00:00 2001 From: Huang Peng Date: Wed, 18 Jun 2008 17:40:51 +0800 Subject: [PATCH] Only send destroy signal one time. --- ibus/object.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ibus/object.py b/ibus/object.py index af6a0fe..e250b0c 100644 --- a/ibus/object.py +++ b/ibus/object.py @@ -8,7 +8,13 @@ class Object (gobject.GObject): ()) } + def __init__ (self): + gobject.GObject.__init__ (self) + self._destroyed = False + def destroy (self): - self.emit ("destroy") + if not self._destroyed: + self.emit ("destroy") + self._destroyed = True gobject.type_register (Object) -- 2.11.4.GIT