# HG changeset patch
# User Yuki KODAMA <[email protected]>
# Date 1244870300 -32400
# Node ID be5ca1f050992a6ef9c74ff78aba487275b74e0c
# Parent  0b15a20db2f277e1f79977566366ae788c9196a0
thgconfig: small refactoring for PathEditDialog

diff --git a/hggtk/thgconfig.py b/hggtk/thgconfig.py
--- a/hggtk/thgconfig.py
+++ b/hggtk/thgconfig.py
@@ -280,18 +280,12 @@

     def sethandlers(self, enable=True):
         for n, (e, l, h) in self.entries.iteritems():
-            if n == 'URL':
-                if enable:
-                    self.entries[n][2] = e.connect('changed', self.changedurl)
-                else:
-                    if e.handler_is_connected(h):
-                        e.disconnect(h)
+            if enable:
+                handler = self.changedurl if n == 'URL' else self.changed
+                self.entries[n][2] = e.connect('changed', handler)
             else:
-                if enable:
-                    self.entries[n][2] = e.connect('changed', self.changed)
-                else:
-                    if e.handler_is_connected(h):
-                        e.disconnect(h)
+                if e.handler_is_connected(h):
+                    e.disconnect(h)

     def urlparse(self, path):
         if path.startswith('ssh://'):

Attachment: thg-crew-kuy_rev2833.patch
Description: Binary data

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to