[gedit-latex] windowactivatable: do not connect to destroy event for the window



commit 93ee0cb4309a43b2c5a1e4d342c8d7b5218c5d58
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Sun Jun 26 16:41:00 2011 +0200

    windowactivatable: do not connect to destroy event for the window
    
    the do_deactivate is called when the window is destroyed too so
    there is no need to listen to destroy event.

 latex/base/windowactivatable.py |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/latex/base/windowactivatable.py b/latex/base/windowactivatable.py
index 6d868bc..72897fe 100644
--- a/latex/base/windowactivatable.py
+++ b/latex/base/windowactivatable.py
@@ -89,8 +89,7 @@ class LaTeXWindowActivatable(GObject.Object, Gedit.WindowActivatable, PeasGtk.Co
 		self._signal_handlers = [
 				self.window.connect("tab_added", self._on_tab_added),
 				self.window.connect("tab_removed", self._on_tab_removed),
-				self.window.connect("active_tab_changed", self._on_active_tab_changed),
-				self.window.connect("destroy", self._on_window_destroyed) ]
+				self.window.connect("active_tab_changed", self._on_active_tab_changed) ]
 
 	def do_deactivate(self):
 		"""
@@ -107,8 +106,8 @@ class LaTeXWindowActivatable(GObject.Object, Gedit.WindowActivatable, PeasGtk.Co
 		self._tab_decorators = {}
 
 		# disconnect from tab signals
-		for id in self._signal_handlers:
-			self.window.disconnect(id)
+		for handler in self._signal_handlers:
+			self.window.disconnect(handler)
 		del self._signal_handlers
 
 		# remove all views



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