summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-11-18 18:42:11 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-11-18 18:42:11 (GMT)
commitbba003ef248786399aeb1aed4b0c2007b28bce56 (patch)
treea5738451da28aafa3505cc84a5d2fcf0dd1eaf18 /Lib/lib-tk
parentef5fd3e7c991feb1a712e4b791d5a2552ae09f81 (diff)
downloadcpython-bba003ef248786399aeb1aed4b0c2007b28bce56.zip
cpython-bba003ef248786399aeb1aed4b0c2007b28bce56.tar.gz
cpython-bba003ef248786399aeb1aed4b0c2007b28bce56.tar.bz2
Patch #1472877: Fix Tix subwidget name resolution.
Will backport to 2.5.
Diffstat (limited to 'Lib/lib-tk')
-rwxr-xr-xLib/lib-tk/Tix.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py
index 33ac519..b7a0fc0 100755
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -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