Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18522
Modified Files:
hierlist.py
Log Message:
allow unicode text so the COM browser doesn't break.
Index: hierlist.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/tools/hierlist.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** hierlist.py 4 Jun 2000 06:17:14 -0000 1.6
--- hierlist.py 1 Jul 2008 01:23:51 -0000 1.7
***************
*** 139,143 ****
def AddItem(self, parentHandle, item, hInsertAfter = commctrl.TVI_LAST):
text = self.GetText(item)
- # hitem = self.list.InsertItem(text, 0, 1)
if self.IsExpandable(item):
cItems = 1 # Trick it !!
--- 139,142 ----
***************
*** 147,150 ****
--- 146,151 ----
bitmapSel = self.GetSelectedBitmapColumn(item)
if bitmapSel is None: bitmapSel = bitmapCol
+ if type(text) is unicode:
+ text = text.encode("mbcs")
hitem = self.list.InsertItem(parentHandle, hInsertAfter, (None, None, None, text, bitmapCol, bitmapSel, cItems, 0))
self.itemHandleMap[hitem] = item
|