Autosyncing with Wine HEAD

svn path=/trunk/; revision=31178
This commit is contained in:
The Wine Synchronizer 2007-12-12 08:52:08 +00:00
parent a18a66aced
commit aa81962d7e
14 changed files with 41 additions and 95 deletions

View file

@ -82,15 +82,6 @@ Index: propsheet.c
}
/******************************************************************************
@@ -3521,6 +3525,8 @@
* from which to switch to the next page */
SendMessageW(hwndTabCtrl, TCM_SETCURSEL, psInfo->active_page, 0);
+ PROPSHEET_UnChanged(hwnd, (HWND)wParam);
+
return TRUE;
}
Index: tooltips.c
===================================================================
--- tooltips.c (revision 25790)
@ -143,54 +134,3 @@ Index: treeview.c
if (infoPtr->cdmode & CDRF_NOTIFYPOSTPAINT)
infoPtr->cdmode =
TREEVIEW_SendCustomDrawNotify(infoPtr, CDDS_POSTPAINT, hdc, rect);
@@ -4160,6 +4158,22 @@
static LRESULT
TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
{
+ TVHITTESTINFO ht;
+
+ ht.pt = *pPt;
+
+ TREEVIEW_HitTest(infoPtr, &ht);
+
+ if (ht.hItem)
+ {
+ /* Change to screen coordinate for WM_CONTEXTMENU */
+ ClientToScreen(infoPtr->hwnd, &ht.pt);
+
+ /* Send a WM_CONTEXTMENU message in response to the RBUTTONUP */
+ SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
+ (WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
+ }
+
return 0;
}
Index: monthcal.c
===================================================================
--- monthcal.c (revision 29360)
+++ monthcal.c (working copy)
@@ -1719,11 +1719,12 @@
static LRESULT
-MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr)
+MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr, HWND hFocusWnd)
{
TRACE("\n");
- InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
+ if (infoPtr->hwndNotify != hFocusWnd)
+ ShowWindow(infoPtr->hwndSelf, SW_HIDE);
return 0;
}
@@ -2031,7 +2032,7 @@
return DLGC_WANTARROWS | DLGC_WANTCHARS;
case WM_KILLFOCUS:
- return MONTHCAL_KillFocus(infoPtr);
+ return MONTHCAL_KillFocus(infoPtr, wParam);
case WM_RBUTTONDOWN:
return MONTHCAL_RButtonDown(infoPtr, lParam);

View file

@ -834,8 +834,8 @@ INT WINAPI EnumMRUListW (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
const WINEMRUITEM *witem;
INT desired, datasize;
if (nItemPos >= mp->cursize) return -1;
if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
if (nItemPos >= mp->cursize) return -1;
desired = mp->realMRU[nItemPos];
desired -= 'a';
TRACE("nItemPos=%d, desired=%d\n", nItemPos, desired);
@ -860,8 +860,8 @@ INT WINAPI EnumMRUListA (HANDLE hList, INT nItemPos, LPVOID lpBuffer,
INT desired, datasize;
DWORD lenA;
if (nItemPos >= mp->cursize) return -1;
if ((nItemPos < 0) || !lpBuffer) return mp->cursize;
if (nItemPos >= mp->cursize) return -1;
desired = mp->realMRU[nItemPos];
desired -= 'a';
TRACE("nItemPos=%d, desired=%d\n", nItemPos, desired);

View file

@ -343,7 +343,7 @@ MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu,
else {
/* menu item was selected */
if (HIWORD(wParam) & MF_POPUP)
uMenuID = (UINT)*(lpwIDs+1);
uMenuID = *(lpwIDs+1);
else
uMenuID = (UINT)LOWORD(wParam);
TRACE("uMenuID = %u\n", uMenuID);

View file

@ -443,7 +443,7 @@ HDPA WINAPI DPA_Clone (const HDPA hdpa, const HDPA hdpaNew)
/* create a new pointer array */
nNewItems = hdpaTemp->nGrow *
((INT)((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1);
(((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1);
nSize = nNewItems * sizeof(LPVOID);
hdpaTemp->ptrs = HeapAlloc (hdpaTemp->hHeap, HEAP_ZERO_MEMORY, nSize);
hdpaTemp->nMaxCount = nNewItems;
@ -583,7 +583,7 @@ BOOL WINAPI DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p)
if (hdpa->nMaxCount <= i) {
/* resize the block of memory */
INT nNewItems =
hdpa->nGrow * ((INT)(((i+1) - 1) / hdpa->nGrow) + 1);
hdpa->nGrow * ((((i+1) - 1) / hdpa->nGrow) + 1);
INT nSize = nNewItems * sizeof(LPVOID);
if (hdpa->ptrs)
@ -654,7 +654,7 @@ LPVOID WINAPI DPA_DeletePtr (const HDPA hdpa, INT i)
return NULL;
hdpa->nMaxCount = nNewItems;
hdpa->ptrs = (LPVOID*)lpDest;
hdpa->ptrs = lpDest;
}
return lpTemp;

View file

@ -211,7 +211,7 @@ BOOL WINAPI DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc)
else {
/* resize the block of memory */
nNewItems =
hdsa->nGrow * ((INT)(((nIndex + 1) - 1) / hdsa->nGrow) + 1);
hdsa->nGrow * ((((nIndex + 1) - 1) / hdsa->nGrow) + 1);
nSize = hdsa->nItemSize * nNewItems;
lpTemp = ReAlloc (hdsa->pData, nSize);

View file

@ -981,7 +981,7 @@ HEADER_CreateDragImage (HWND hwnd, WPARAM wParam)
int height, width;
HFONT hFont;
if (wParam < 0 || wParam >= infoPtr->uNumItem)
if (wParam >= infoPtr->uNumItem)
return FALSE;
if (!infoPtr->bRectsValid)

View file

@ -944,7 +944,7 @@ static inline DWORD notify_customdraw (const LISTVIEW_INFO *infoPtr, DWORD dwDra
return result;
}
static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpnmlvcd)
static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRAW *lpnmlvcd, BOOL SubItem)
{
if (lpnmlvcd->clrTextBk == CLR_DEFAULT)
lpnmlvcd->clrTextBk = comctl32_color.clrWindow;
@ -952,18 +952,21 @@ static void prepaint_setup (const LISTVIEW_INFO *infoPtr, HDC hdc, NMLVCUSTOMDRA
lpnmlvcd->clrText = comctl32_color.clrWindowText;
/* apprently, for selected items, we have to override the returned values */
if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED)
if (!SubItem)
{
if (infoPtr->bFocus)
{
lpnmlvcd->clrTextBk = comctl32_color.clrHighlight;
lpnmlvcd->clrText = comctl32_color.clrHighlightText;
if (lpnmlvcd->nmcd.uItemState & CDIS_SELECTED)
{
if (infoPtr->bFocus)
{
lpnmlvcd->clrTextBk = comctl32_color.clrHighlight;
lpnmlvcd->clrText = comctl32_color.clrHighlightText;
}
else if (infoPtr->dwStyle & LVS_SHOWSELALWAYS)
{
lpnmlvcd->clrTextBk = comctl32_color.clr3dFace;
lpnmlvcd->clrText = comctl32_color.clrBtnText;
}
}
else if (infoPtr->dwStyle & LVS_SHOWSELALWAYS)
{
lpnmlvcd->clrTextBk = comctl32_color.clr3dFace;
lpnmlvcd->clrText = comctl32_color.clrBtnText;
}
}
/* Set the text attributes */
@ -3787,7 +3790,9 @@ static BOOL LISTVIEW_DrawItem(LISTVIEW_INFO *infoPtr, HDC hdc, INT nItem, INT nS
if (cdsubitemmode & CDRF_SKIPDEFAULT) goto postpaint;
}
if (nSubItem == 0 || (cdmode & CDRF_NOTIFYITEMDRAW))
prepaint_setup(infoPtr, hdc, &nmlvcd);
prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
else if ((infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT) == FALSE)
prepaint_setup(infoPtr, hdc, &nmlvcd, TRUE);
/* in full row select, subitems, will just use main item's colors */
if (nSubItem && uView == LVS_REPORT && (infoPtr->dwLvExStyle & LVS_EX_FULLROWSELECT))
@ -3930,7 +3935,7 @@ static void LISTVIEW_RefreshOwnerDraw(const LISTVIEW_INFO *infoPtr, ITERATOR *i,
if (!(cditemmode & CDRF_SKIPDEFAULT))
{
prepaint_setup (infoPtr, hdc, &nmlvcd);
prepaint_setup (infoPtr, hdc, &nmlvcd, FALSE);
SendMessageW(infoPtr->hwndNotify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis);
}
@ -4118,7 +4123,7 @@ static void LISTVIEW_Refresh(LISTVIEW_INFO *infoPtr, HDC hdc, const RECT *prcEra
customdraw_fill(&nmlvcd, infoPtr, hdc, &rcClient, 0);
cdmode = notify_customdraw(infoPtr, CDDS_PREPAINT, &nmlvcd);
if (cdmode & CDRF_SKIPDEFAULT) goto enddraw;
prepaint_setup(infoPtr, hdc, &nmlvcd);
prepaint_setup(infoPtr, hdc, &nmlvcd, FALSE);
/* Use these colors to draw the items */
infoPtr->clrTextBk = nmlvcd.clrTextBk;
@ -5040,12 +5045,12 @@ static INT LISTVIEW_FindItemA(const LISTVIEW_INFO *infoPtr, INT nStart,
BOOL hasText = lpFindInfo->flags & (LVFI_STRING | LVFI_PARTIAL);
LVFINDINFOW fiw;
INT res;
LPWSTR strW;
LPWSTR strW = NULL;
memcpy(&fiw, lpFindInfo, sizeof(fiw));
if (hasText) fiw.psz = strW = textdupTtoW((LPCWSTR)lpFindInfo->psz, FALSE);
res = LISTVIEW_FindItemW(infoPtr, nStart, &fiw);
if (hasText) textfreeT(strW, FALSE);
textfreeT(strW, FALSE);
return res;
}

View file

@ -1725,6 +1725,8 @@ MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr, HWND hFocusWnd)
if (infoPtr->hwndNotify != hFocusWnd)
ShowWindow(infoPtr->hwndSelf, SW_HIDE);
else
InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
return 0;
}
@ -2032,7 +2034,7 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return DLGC_WANTARROWS | DLGC_WANTCHARS;
case WM_KILLFOCUS:
return MONTHCAL_KillFocus(infoPtr, wParam);
return MONTHCAL_KillFocus(infoPtr, (HWND)wParam);
case WM_RBUTTONDOWN:
return MONTHCAL_RButtonDown(infoPtr, lParam);

View file

@ -1527,7 +1527,7 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo)
if ((psInfo->ppshheader.dwFlags & PSH_WATERMARK) &&
!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK))
{
((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark =
psInfo->ppshheader.u4.hbmWatermark =
CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0);
}
@ -1535,7 +1535,7 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo)
if ((psInfo->ppshheader.dwFlags & PSH_HEADER) &&
!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER))
{
((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader =
psInfo->ppshheader.u5.hbmHeader =
CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0);
}
}
@ -2081,7 +2081,7 @@ static BOOL PROPSHEET_SetCurSel(HWND hwndDlg,
index = PROPSHEET_FindPageByResId(psInfo, result);
if(index >= psInfo->nPages) {
index = old_index;
WARN("Tried to skip to nonexistant page by res id\n");
WARN("Tried to skip to nonexistent page by res id\n");
break;
}
continue;

View file

@ -2797,7 +2797,7 @@ REBAR_GetFont (const REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
static LRESULT
REBAR_PushChevron(const REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
{
if (wParam >= 0 && (UINT)wParam < infoPtr->uNumBands)
if ((UINT)wParam < infoPtr->uNumBands)
{
NMREBARCHEVRON nmrbc;
REBAR_BAND *lpBand = &infoPtr->bands[wParam];

View file

@ -3190,7 +3190,7 @@ TOOLBAR_Customize (HWND hwnd)
(LPWSTR)RT_DIALOG)))
return FALSE;
if(!(template = (LPVOID)LoadResource (COMCTL32_hModule, hRes)))
if(!(template = LoadResource (COMCTL32_hModule, hRes)))
return FALSE;
ret = DialogBoxIndirectParamW ((HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE),
@ -5893,7 +5893,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr->nButtonDown = -1;
/* Issue NM_RELEASEDCAPTURE to parent to let him know it is released */
TOOLBAR_SendNotify ((NMHDR *) &hdr, infoPtr,
TOOLBAR_SendNotify (&hdr, infoPtr,
NM_RELEASEDCAPTURE);
/* native issues TBN_ENDDRAG here, if _LBUTTONDOWN issued the

View file

@ -1109,7 +1109,7 @@ TOOLTIPS_AddToolW (HWND hwnd, WPARAM wParam, LPARAM lParam)
if (IS_INTRESOURCE(lpToolInfo->lpszText)) {
TRACE("add string id %x\n", LOWORD(lpToolInfo->lpszText));
toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText;
toolPtr->lpszText = lpToolInfo->lpszText;
}
else if (lpToolInfo->lpszText) {
if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACKW) {

View file

@ -811,7 +811,7 @@ TRACKBAR_UpdateToolTip (const TRACKBAR_INFO *infoPtr)
ClientToScreen(infoPtr->hwndSelf, &pt);
SendMessageW (infoPtr->hwndToolTip, TTM_TRACKPOSITION,
0, (LPARAM)MAKELPARAM(pt.x, pt.y));
0, MAKELPARAM(pt.x, pt.y));
}

View file

@ -3994,7 +3994,7 @@ TREEVIEW_LButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam)
if(ht.hItem && (ht.flags & TVHT_ONITEM))
{
infoPtr->focusedItem = ht.hItem;
InvalidateRect(hwnd, &(((HTREEITEM)(ht.hItem))->rect), TRUE);
InvalidateRect(hwnd, &ht.hItem->rect, TRUE);
if(infoPtr->selectedItem)
InvalidateRect(hwnd, &(infoPtr->selectedItem->rect), TRUE);
@ -4173,7 +4173,6 @@ TREEVIEW_RButtonUp(const TREEVIEW_INFO *infoPtr, const POINT *pPt)
SendMessageW(infoPtr->hwnd, WM_CONTEXTMENU,
(WPARAM)infoPtr->hwnd, MAKELPARAM(ht.pt.x, ht.pt.y));
}
return 0;
}