Hi all, - add OPENFILENAMEA struct trace - quote strings (better in case of LFNs) - minor cleanups -- Andreas Mohr Stauferstr. 6, D-71272 Renningen, Germany
Determining best CVS host... Using CVSROOT :pserver:cvs@rhlx01.fht-esslingen.de:/home/wine Index: dlls/commdlg/filedlg95.c =================================================================== RCS file: /home/wine/wine/dlls/commdlg/filedlg95.c,v retrieving revision 1.75 diff -u -r1.75 filedlg95.c --- dlls/commdlg/filedlg95.c 25 Jun 2002 02:55:53 -0000 1.75 +++ dlls/commdlg/filedlg95.c 29 Jun 2002 18:42:23 -0000 @@ -22,8 +22,8 @@ * many hook-messages expecting a pointer to a * OPENFILENAMEA or W structure. With the current architecture * we would have to convert the beast at every call to a hook. - * we have to find a better solution but if would likely cause - * a complete rewrite with after we shouldhandle the + * we have to find a better solution but it would likely cause + * a complete rewrite after which we should handle the * OPENFILENAME structure without any converting (jsch). * * FIXME: any hook gets a OPENFILENAMEA structure @@ -353,6 +353,8 @@ ofn->Flags = dwFlags; ofn->hInstance = hInstance; MemFree((LPVOID)(fodInfos)); + TRACE("<-- OPENFILENAMEA: lStructSize %ld, hwndOwner %04x, hInstance %x, lpstrFilter '%s', lpstrCustomFilter '%s', nMaxCustFilter %ld, nFilterIndex %ld, lpstrFile '%s', nMaxFile %ld, lpstrFileTitle '%s', nMaxFileTitle %ld, lpstrInitialDir '%s', lpstrTitle '%s', Flags %08lx, nFileOffset %d, nFileExtension %d, lpstrDefExt '%s', lCustData %08lx, lpfnHook %p, lpTemplateName '%s'\n", ofn->lStructSize, ofn->hwndOwner, ofn->hInstance, ofn->lpstrFilter, ofn->lpstrCustomFilter, ofn->nMaxCustFilter, ofn->nFilterIndex, ofn->lpstrFile, ofn->nMaxFile, ofn->lpstrFileTitle, ofn->nMaxFileTitle, ofn->lpstrInitialDir, ofn->lpstrTitle, ofn->Flags, ofn->nFileOffset, ofn->nFileExtension, ofn->lpstrDefExt, ofn->lCustData, ofn->lpfnHook, ofn->lpTemplateName); + return ret; } @@ -849,7 +851,10 @@ case CDM_SETCONTROLTEXT: if ( 0 != lParam ) + { + TRACE("setting to '%s'\n", (LPSTR)lParam); SetDlgItemTextA( hwnd, (UINT) wParam, (LPSTR) lParam ); + } return TRUE; case CDM_HIDECONTROL: @@ -1267,7 +1272,7 @@ FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) lParam; - TRACE("dir=%s file=%s\n", + TRACE("dir='%s' file='%s'\n", fodInfos->ofnInfos->lpstrInitialDir, fodInfos->ofnInfos->lpstrFile); /* Get the initial directory pidl */ @@ -1509,7 +1514,7 @@ goto ret; } - TRACE("count=%u len=%u file=%s\n", nFileCount, sizeUsed, lpstrFileList); + TRACE("count=%u len=%u file='%s'\n", nFileCount, sizeUsed, lpstrFileList); /* Step 1: Build a complete path name from the current folder and @@ -1532,9 +1537,9 @@ } PathAddBackslashA(lpstrPathAndFile); - TRACE("current directory=%s\n", lpstrPathAndFile); + TRACE("current directory='%s'\n", lpstrPathAndFile); - /* if the user specifyed a fully qualified path use it */ + /* if the user specified a fully qualified path use it */ if(PathIsRelativeA(lpstrFileList)) { strcat(lpstrPathAndFile, lpstrFileList); @@ -1551,7 +1556,7 @@ /* resolve "." and ".." */ PathCanonicalizeA(lpstrTemp, lpstrPathAndFile ); strcpy(lpstrPathAndFile, lpstrTemp); - TRACE("canon=%s\n", lpstrPathAndFile); + TRACE("canon='%s'\n", lpstrPathAndFile); MemFree(lpstrFileList); @@ -1614,7 +1619,7 @@ } lpszTemp1 = lpszTemp; - TRACE("parse now=%s next=%s sf=%p\n",debugstr_w(lpwstrTemp), debugstr_a(lpszTemp), lpsf); + TRACE("parse now='%s' next='%s' sf=%p\n",debugstr_w(lpwstrTemp), debugstr_a(lpszTemp), lpsf); if(lstrlenW(lpwstrTemp)==2) PathAddBackslashW(lpwstrTemp); @@ -1689,7 +1694,7 @@ switch(nOpenAction) { case ONOPEN_SEARCH: /* set the current filter to the file mask and refresh */ - TRACE("ONOPEN_SEARCH %s\n", lpstrPathAndFile); + TRACE("ONOPEN_SEARCH '%s'\n", lpstrPathAndFile); { int iPos; LPSTR lpszTemp = PathFindFileNameA(lpstrPathAndFile); @@ -1731,7 +1736,7 @@ ret = FALSE; break; case ONOPEN_OPEN: /* fill in the return struct and close the dialog */ - TRACE("ONOPEN_OPEN %s\n", lpstrPathAndFile); + TRACE("ONOPEN_OPEN '%s'\n", lpstrPathAndFile); { /* add default extension */ if (fodInfos->ofnInfos->lpstrDefExt) @@ -2398,13 +2403,13 @@ SHGFI_DISPLAYNAME | SHGFI_SYSICONINDEX | SHGFI_PIDL | SHGFI_SMALLICON | SHGFI_ATTRIBUTES | SHGFI_ATTR_SPECIFIED); - TRACE("-- Add %s attr=%08lx\n", sfi.szDisplayName, sfi.dwAttributes); + TRACE("-- Add '%s' attr=%08lx\n", sfi.szDisplayName, sfi.dwAttributes); if((sfi.dwAttributes & SFGAO_FILESYSANCESTOR) || (sfi.dwAttributes & SFGAO_FILESYSTEM)) { int iItemID; - TRACE("-- Add %s at %u\n", sfi.szDisplayName, tmpFolder->m_iIndent); + TRACE("-- Add '%s' at %u\n", sfi.szDisplayName, tmpFolder->m_iIndent); /* Add the item at the end of the list */ if(iInsertId < 0) @@ -2613,7 +2618,7 @@ if (pidl) { - /* get the total length of the selected file names*/ + /* get the total length of the selected file names */ lpstrTemp[0] = '\0'; GetName( fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER|SHGDN_FORPARSING, lpstrTemp );