Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/dialogs
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv24802/Pythonwin/pywin/dialogs
Modified Files:
ideoptions.py list.py
Log Message:
Various modernizations to .py code via the py3k branch.
Index: list.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/dialogs/list.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** list.py 1 Sep 1999 23:33:43 -0000 1.1
--- list.py 14 Nov 2008 00:22:25 -0000 1.2
***************
*** 45,51 ****
def OnListItemChange(self,std, extra):
(hwndFrom, idFrom, code), (itemNotify, sub, newState, oldState, change, point, lparam) = std, extra
! oldSel = (oldState & commctrl.LVIS_SELECTED)<>0
! newSel = (newState & commctrl.LVIS_SELECTED)<>0
! if oldSel <> newSel:
try:
self.selecteditem = itemNotify
--- 45,51 ----
def OnListItemChange(self,std, extra):
(hwndFrom, idFrom, code), (itemNotify, sub, newState, oldState, change, point, lparam) = std, extra
! oldSel = (oldState & commctrl.LVIS_SELECTED)!=0
! newSel = (newState & commctrl.LVIS_SELECTED)!=0
! if oldSel != newSel:
try:
self.selecteditem = itemNotify
Index: ideoptions.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/dialogs/ideoptions.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ideoptions.py 11 Mar 2000 00:57:53 -0000 1.2
--- ideoptions.py 14 Nov 2008 00:22:25 -0000 1.3
***************
*** 88,92 ****
def ChangeFormat(self, fmtAttribute, fmt):
dlg = win32ui.CreateFontDialog(fmt)
! if dlg.DoModal() <> win32con.IDOK: return None
return dlg.GetCharFormat()
--- 88,92 ----
def ChangeFormat(self, fmtAttribute, fmt):
dlg = win32ui.CreateFontDialog(fmt)
! if dlg.DoModal() != win32con.IDOK: return None
return dlg.GetCharFormat()
|