Update of /cvsroot/pywin32/pywin32/win32/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23151/win32/lib
Modified Files:
win32gui_struct.py
Log Message:
Correct confusion in win32gui_struct between 'dwTypeData' and 'dwItemData'
Index: win32gui_struct.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32gui_struct.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** win32gui_struct.py 12 Apr 2005 03:33:45 -0000 1.8
--- win32gui_struct.py 2 Jul 2006 23:28:46 -0000 1.9
***************
*** 47,55 ****
def PackMENUITEMINFO(fType=None, fState=None, wID=None, hSubMenu=None,
! hbmpChecked=None, hbmpUnchecked=None, dwTypeData=None,
! text=None, hbmpItem=None):
# 'extras' are objects the caller must keep a reference to (as their
# memory is used) for the lifetime of the INFO item.
extras = []
fMask = 0
if fType is None: fType = 0
--- 47,65 ----
def PackMENUITEMINFO(fType=None, fState=None, wID=None, hSubMenu=None,
! hbmpChecked=None, hbmpUnchecked=None, dwItemData=None,
! text=None, hbmpItem=None, dwTypeData=None):
# 'extras' are objects the caller must keep a reference to (as their
# memory is used) for the lifetime of the INFO item.
extras = []
+ # ack - dwItemData and dwTypeData were confused for a while...
+ assert dwItemData is None or dwTypeData is None, \
+ "sorry - these were confused - you probably want dwItemData"
+ # if we are a long way past 209, then we can nuke the above...
+ if dwTypeData is not None:
+ import warnings
+ warnings.warn("PackMENUITEMINFO: please use dwItemData instead of dwTypeData")
+ if dwItemData is None:
+ dwItemData = dwTypeData or 0
+
fMask = 0
if fType is None: fType = 0
***************
*** 69,73 ****
"neither or both checkmark bmps must be given"
fMask |= win32con.MIIM_CHECKMARKS
! if dwTypeData is None: dwTypeData = 0
else: fMask |= win32con.MIIM_DATA
if hbmpItem is None: hbmpItem = 0
--- 79,83 ----
"neither or both checkmark bmps must be given"
fMask |= win32con.MIIM_CHECKMARKS
! if dwItemData is None: dwItemData = 0
else: fMask |= win32con.MIIM_DATA
if hbmpItem is None: hbmpItem = 0
***************
*** 87,91 ****
cch = 0
# Create the struct.
- dwItemData = 0
item = struct.pack(
menuitem_fmt,
--- 97,100 ----
|