gedit-plugins r364 - in trunk: . plugins/drawspaces



Author: pborelli
Date: Tue Jun 10 10:10:51 2008
New Revision: 364
URL: http://svn.gnome.org/viewvc/gedit-plugins?rev=364&view=rev

Log:
2008-06-10  Paolo Borelli  <pborelli katamail com>

	* plugins/drawspaces/drawspaces.py: properly disconnect the tab-added
	handler.



Modified:
   trunk/ChangeLog
   trunk/plugins/drawspaces/drawspaces.py

Modified: trunk/plugins/drawspaces/drawspaces.py
==============================================================================
--- trunk/plugins/drawspaces/drawspaces.py	(original)
+++ trunk/plugins/drawspaces/drawspaces.py	Tue Jun 10 10:10:51 2008
@@ -158,11 +158,10 @@
         self._plugin = None
 
     def set_tab_added_handler(self, handler):
-        if handler is None:
-            if self._handler_id:
-                self._window.disconnect(handler_id)
-        else:
-            self.handler_id = self._window.connect("tab-added", handler)
+        if handler:
+            self._handler_id = self._window.connect("tab-added", handler)
+        elif self._handler_id:
+                self._window.disconnect(self._handler_id)
 
     def on_active_toggled(self, checkbox):
         gconf_set_bool(GCONF_KEY_ENABLE, checkbox.get_active())



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