]> granicus.if.org Git - python/commitdiff
Patch #1472877: Fix Tix subwidget name resolution.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Nov 2006 18:42:22 +0000 (18:42 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 18 Nov 2006 18:42:22 +0000 (18:42 +0000)
Lib/lib-tk/Tix.py
Misc/NEWS

index 33ac5190de1f73cf827e54b21649d4c250827211..b7a0fc0776e0d5f56c2c49d59315689ce60e4a95 100755 (executable)
@@ -421,7 +421,7 @@ class TixSubWidget(TixWidget):
             except:
                 plist = []
 
-        if (not check_intermediate) or len(plist) < 2:
+        if not check_intermediate:
             # immediate descendant
             TixWidget.__init__(self, master, None, None, {'name' : name})
         else:
@@ -437,6 +437,9 @@ class TixSubWidget(TixWidget):
                     parent = TixSubWidget(parent, plist[i],
                                           destroy_physically=0,
                                           check_intermediate=0)
+            # The Tk widget name is in plist, not in name
+            if plist:
+                name = plist[-1]
             TixWidget.__init__(self, parent, None, None, {'name' : name})
         self.destroy_physically = destroy_physically
 
index 5b9815535037163da82931bf94facdd854d89ede..28543f6f7553966da0cd582d0e4c723fc308a992 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -103,6 +103,8 @@ Extension Modules
 Library
 -------
 
+- Patch #1472877: Fix Tix subwidget name resolution.
+
 - Patch #1594554: Always close a tkSimpleDialog on ok(), even
   if an exception occurs.