Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3164/pywin/debugger
Modified Files:
debugger.py
Log Message:
expose if win32ui is build as unicode and hook the 'W' version of some messages accordingly
Index: debugger.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/debugger/debugger.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** debugger.py 4 Jan 2009 01:53:29 -0000 1.23
--- debugger.py 14 Jan 2009 12:11:46 -0000 1.24
***************
*** 28,31 ****
--- 28,35 ----
#import win32traceutil
+ if win32ui.UNICODE:
+ LVN_ENDLABELEDIT = commctrl.LVN_ENDLABELEDITW
+ else:
+ LVN_ENDLABELEDIT = commctrl.LVN_ENDLABELEDITA
from dbgcon import *
***************
*** 238,242 ****
itemDetails = (commctrl.LVCFMT_LEFT, width, title, 0)
list.InsertColumn(col, itemDetails)
! parent.HookNotify( self.OnListEndLabelEdit, commctrl.LVN_ENDLABELEDIT)
parent.HookNotify(self.OnItemRightClick, commctrl.NM_RCLICK)
parent.HookNotify(self.OnItemDoubleClick, commctrl.NM_DBLCLK)
--- 242,246 ----
itemDetails = (commctrl.LVCFMT_LEFT, width, title, 0)
list.InsertColumn(col, itemDetails)
! parent.HookNotify(self.OnListEndLabelEdit, LVN_ENDLABELEDIT)
parent.HookNotify(self.OnItemRightClick, commctrl.NM_RCLICK)
parent.HookNotify(self.OnItemDoubleClick, commctrl.NM_DBLCLK)
***************
*** 249,254 ****
def EditSelected(self):
! sel = self.GetNextItem(-1, commctrl.LVNI_SELECTED)
! if sel == -1:
return
self.EditLabel(sel)
--- 253,259 ----
def EditSelected(self):
! try:
! sel = self.GetNextItem(-1, commctrl.LVNI_SELECTED)
! except win32ui.error:
return
self.EditLabel(sel)
|