Author: janderwald Date: Sat Jun 28 08:15:16 2008 New Revision: 34152
URL: http://svn.reactos.org/svn/reactos?rev=34152&view=rev Log: - only display filename in the title for the file property dialog - pass the stripped filename to SH_FileVersionDlgProc - fix identation - fix bug 3401
Modified: trunk/reactos/dll/win32/shell32/fprop.c
Modified: trunk/reactos/dll/win32/shell32/fprop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/fprop.c?r... ============================================================================== --- trunk/reactos/dll/win32/shell32/fprop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/fprop.c [iso-8859-1] Sat Jun 28 08:15:16 2008 @@ -667,8 +667,9 @@ HPROPSHEETPAGE hppages[MAX_PROPERTY_SHEET_PAGE]; HPROPSHEETPAGE hpage; WCHAR wFileName[MAX_PATH]; - UINT num_pages = 0; - DWORD dwHandle = 0; + UINT num_pages = 0; + DWORD dwHandle = 0; + WCHAR * pFileName;
TRACE("SH_ShowPropertiesDialog entered filename %s\n", debugstr_w(lpf));
@@ -690,10 +691,10 @@
*dst = '\0'; } - else - { - strcpyW(wFileName, lpf); - } + else + { + strcpyW(wFileName, lpf); + }
if (PathIsDirectoryW(wFileName) || strlenW(wFileName) == 3) { @@ -708,19 +709,27 @@ hppages[num_pages] = hpage; num_pages++; if ( GetFileVersionInfoSizeW(lpf, &dwHandle) ) - { - if ( (hpage = SH_CreatePropertySheetPage("SHELL_FILE_VERSION_DLG",SH_FileVersionDlgProc, (LPARAM)lpf, NULL))!= NULL) - { - hppages[num_pages] = hpage; - num_pages++; - } - } + { + if ( (hpage = SH_CreatePropertySheetPage("SHELL_FILE_VERSION_DLG",SH_FileVersionDlgProc, (LPARAM)wFileName, NULL))!= NULL) + { + hppages[num_pages] = hpage; + num_pages++; + } + } + + pFileName = wcsrchr(wFileName, '\'); + if (!pFileName) + pFileName = wFileName; + else + pFileName++; + + memset(&pinfo, 0x0, sizeof(PROPSHEETHEADERW)); pinfo.dwSize = sizeof(PROPSHEETHEADERW); pinfo.dwFlags = PSH_NOCONTEXTHELP | PSH_PROPTITLE; pinfo.nPages = num_pages; pinfo.u3.phpage = hppages; - pinfo.pszCaption = wFileName; + pinfo.pszCaption = pFileName; return (PropertySheetW(&pinfo) != -1); } /*EOF */