Author: rharabien
Date: Fri Jan 13 17:42:27 2012
New Revision: 54936
URL:
http://svn.reactos.org/svn/reactos?rev=54936&view=rev
Log:
[SHELL32]
- Display free and used space and capacity in bytes and gigabytes for all drives in drive
properties dialog
- Format date and time in file properties according to system locale
- Initialize checkboxes in file properties dialog
- Improve polish translation
Modified:
trunk/reactos/dll/win32/shell32/drvdefext.cpp
trunk/reactos/dll/win32/shell32/drvdefext.h
trunk/reactos/dll/win32/shell32/filedefext.cpp
trunk/reactos/dll/win32/shell32/filedefext.h
trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
Modified: trunk/reactos/dll/win32/shell32/drvdefext.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/drvdefex…
==============================================================================
--- trunk/reactos/dll/win32/shell32/drvdefext.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/drvdefext.cpp [iso-8859-1] Fri Jan 13 17:42:27 2012
@@ -39,6 +39,7 @@
LPGUID lpGuids,
UINT uNumberOfGuids,
HWPAGE_DISPLAYMODE DisplayMode);
+UINT SH_FormatByteSize(LONGLONG cbSize, LPWSTR pwszResult, UINT cchResultMax);
static VOID
GetDriveNameWithLetter(LPWSTR pwszText, UINT cchTextMax, LPCWSTR pwszDrive)
@@ -211,19 +212,15 @@
HPEN hDarkBluePen = CreatePen(PS_SOLID, 1, RGB(0, 0, 128));
HPEN hDarkMagPen = CreatePen(PS_SOLID, 1, RGB(128, 0, 128));
- WCHAR wszBuf[20];
- GetDlgItemTextW(hwndDlg, 14006, wszBuf, _countof(wszBuf));
- UINT cFreeSpace = _wtoi(wszBuf);
-
INT xCenter = (pDrawItem->rcItem.left + pDrawItem->rcItem.right)/2;
INT yCenter = (pDrawItem->rcItem.top + pDrawItem->rcItem.bottom - 10)/2;
INT cx = pDrawItem->rcItem.right - pDrawItem->rcItem.left;
INT cy = pDrawItem->rcItem.bottom - pDrawItem->rcItem.top - 10;
- TRACE("FreeSpace %u a %f cx %d\n", cFreeSpace,
M_PI+cFreeSpace/100.0f*M_PI*2.0f, cx);
+ TRACE("FreeSpace %u a %f cx %d\n", m_FreeSpacePerc,
M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f, cx);
HBRUSH hbrOld = (HBRUSH)SelectObject(pDrawItem->hDC, hMagBrush);
- INT xRadial = xCenter + (INT)(cosf(M_PI+cFreeSpace/100.0f*M_PI*2.0f)*cx/2);
- INT yRadial = yCenter - (INT)(sinf(M_PI+cFreeSpace/100.0f*M_PI*2.0f)*cy/2);
+ INT xRadial = xCenter + (INT)(cosf(M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f)*cx/2);
+ INT yRadial = yCenter - (INT)(sinf(M_PI+m_FreeSpacePerc/100.0f*M_PI*2.0f)*cy/2);
Pie(pDrawItem->hDC,
pDrawItem->rcItem.left, pDrawItem->rcItem.top,
pDrawItem->rcItem.right, pDrawItem->rcItem.bottom - 10,
@@ -241,7 +238,7 @@
HPEN hOldPen = (HPEN)SelectObject(pDrawItem->hDC, hDarkBluePen);
for (INT x = pDrawItem->rcItem.left; x < pDrawItem->rcItem.right; ++x)
{
- if (cFreeSpace < 50 && x == xRadial)
+ if (m_FreeSpacePerc < 50 && x == xRadial)
SelectObject(pDrawItem->hDC, hDarkMagPen);
float cos_val = (x - xCenter)*2.0f/cx;
@@ -269,61 +266,53 @@
bRet = GetVolumeInformationW(m_wszDrive, wszVolumeName, _countof(wszVolumeName),
NULL, NULL, NULL, wszFileSystem, _countof(wszFileSystem));
if (bRet)
{
- /* set volume label */
+ /* Set volume label and filesystem */
SetDlgItemTextW(hwndDlg, 14000, wszVolumeName);
-
- /* set filesystem type */
SetDlgItemTextW(hwndDlg, 14002, wszFileSystem);
}
+ /* Set drive type and icon */
UINT DriveType = GetDriveTypeW(m_wszDrive);
- if (DriveType == DRIVE_FIXED || DriveType == DRIVE_CDROM)
- {
- ULARGE_INTEGER FreeBytesAvailable, TotalNumberOfBytes, TotalNumberOfFreeBytes;
- if(GetDiskFreeSpaceExW(m_wszDrive, &FreeBytesAvailable,
&TotalNumberOfBytes, &TotalNumberOfFreeBytes))
- {
- ULONG SpacePercent;
- HANDLE hVolume;
- DWORD BytesReturned = 0;
-
- swprintf(wszBuf, L"\\\\.\\%c:", towupper(m_wszDrive[0]));
- hVolume = CreateFileW(wszBuf, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0,
NULL);
- if (hVolume != INVALID_HANDLE_VALUE)
- {
- bRet = DeviceIoControl(hVolume, IOCTL_DISK_GET_LENGTH_INFO, NULL, 0,
(LPVOID)&TotalNumberOfBytes, sizeof(ULARGE_INTEGER), &BytesReturned, NULL);
- if (bRet && StrFormatByteSizeW(TotalNumberOfBytes.QuadPart,
wszBuf, sizeof(wszBuf) / sizeof(WCHAR)))
- SetDlgItemTextW(hwndDlg, 14007, wszBuf);
-
- CloseHandle(hVolume);
- }
-
- TRACE("wszBuf %s hVolume %p bRet %d LengthInformation %ul BytesReturned
%d\n", debugstr_w(wszBuf), hVolume, bRet, TotalNumberOfBytes.QuadPart,
BytesReturned);
-
- if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart -
FreeBytesAvailable.QuadPart, wszBuf, sizeof(wszBuf) / sizeof(WCHAR)))
- SetDlgItemTextW(hwndDlg, 14003, wszBuf);
-
- if (StrFormatByteSizeW(FreeBytesAvailable.QuadPart, wszBuf, sizeof(wszBuf) /
sizeof(WCHAR)))
- SetDlgItemTextW(hwndDlg, 14005, wszBuf);
-
- SpacePercent =
(ULONG)(TotalNumberOfFreeBytes.QuadPart*100ull/TotalNumberOfBytes.QuadPart);
- /* set free bytes percentage */
- swprintf(wszBuf, L"%u%%", SpacePercent);
+ UINT IconId, TypeStrId = 0;
+ switch (DriveType)
+ {
+ case DRIVE_CDROM: IconId = IDI_SHELL_CDROM; TypeStrId = IDS_DRIVE_CDROM; break;
+ case DRIVE_REMOVABLE: IconId = IDI_SHELL_FLOPPY; break;
+ case DRIVE_RAMDISK: IconId = IDI_SHELL_RAMDISK; break;
+ default: IconId = IDI_SHELL_DRIVE; TypeStrId = IDS_DRIVE_FIXED;
+ }
+ HICON hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IconId),
IMAGE_ICON, 32, 32, LR_SHARED);
+ if (hIcon)
+ SendDlgItemMessageW(hwndDlg, 14016, STM_SETICON, (WPARAM)hIcon, 0);
+ if (TypeStrId && LoadStringW(shell32_hInstance, TypeStrId, wszBuf,
_countof(wszBuf)))
+ SetDlgItemTextW(hwndDlg, 14001, wszBuf);
+
+ ULARGE_INTEGER FreeBytesAvailable, TotalNumberOfBytes;
+ if(GetDiskFreeSpaceExW(m_wszDrive, &FreeBytesAvailable, &TotalNumberOfBytes,
NULL))
+ {
+ /* Init free space percentage used for drawing piechart */
+ m_FreeSpacePerc = (UINT)(FreeBytesAvailable.QuadPart * 100ull /
TotalNumberOfBytes.QuadPart);
+
+ /* Used space */
+ if (SH_FormatByteSize(TotalNumberOfBytes.QuadPart - FreeBytesAvailable.QuadPart,
wszBuf, _countof(wszBuf)))
+ SetDlgItemTextW(hwndDlg, 14003, wszBuf);
+
+ if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart - FreeBytesAvailable.QuadPart,
wszBuf, _countof(wszBuf)))
+ SetDlgItemTextW(hwndDlg, 14004, wszBuf);
+
+ /* Free space */
+ if (SH_FormatByteSize(FreeBytesAvailable.QuadPart, wszBuf, _countof(wszBuf)))
+ SetDlgItemTextW(hwndDlg, 14005, wszBuf);
+
+ if (StrFormatByteSizeW(FreeBytesAvailable.QuadPart, wszBuf, _countof(wszBuf)))
SetDlgItemTextW(hwndDlg, 14006, wszBuf);
- /* store used share amount */
- SpacePercent = 100 - SpacePercent;
- swprintf(wszBuf, L"%u%%", SpacePercent);
- SetDlgItemTextW(hwndDlg, 14004, wszBuf);
- if (DriveType == DRIVE_FIXED)
- {
- if (LoadStringW(shell32_hInstance, IDS_DRIVE_FIXED, wszBuf,
sizeof(wszBuf) / sizeof(WCHAR)))
- SetDlgItemTextW(hwndDlg, 14001, wszBuf);
- }
- else /* DriveType == DRIVE_CDROM) */
- {
- if (LoadStringW(shell32_hInstance, IDS_DRIVE_CDROM, wszBuf,
sizeof(wszBuf) / sizeof(WCHAR)))
- SetDlgItemTextW(hwndDlg, 14001, wszBuf);
- }
- }
+
+ /* Total space */
+ if (SH_FormatByteSize(FreeBytesAvailable.QuadPart, wszBuf, _countof(wszBuf)))
+ SetDlgItemTextW(hwndDlg, 14007, wszBuf);
+
+ if (StrFormatByteSizeW(TotalNumberOfBytes.QuadPart, wszBuf, _countof(wszBuf)))
+ SetDlgItemTextW(hwndDlg, 14008, wszBuf);
}
/* Set drive description */
@@ -331,18 +320,6 @@
GetDlgItemTextW(hwndDlg, 14009, wszFormat, _countof(wszFormat));
swprintf(wszBuf, wszFormat, m_wszDrive[0]);
SetDlgItemTextW(hwndDlg, 14009, wszBuf);
-
- /* Set drive icon */
- UINT IconId;
- switch (DriveType)
- {
- case DRIVE_CDROM: IconId = IDI_SHELL_CDROM; break;
- case DRIVE_REMOVABLE: IconId = IDI_SHELL_FLOPPY; break;
- case DRIVE_RAMDISK: IconId = IDI_SHELL_RAMDISK; break;
- default: IconId = IDI_SHELL_DRIVE;
- }
- HICON hIcon = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IconId),
IMAGE_ICON, 32, 32, LR_SHARED);
- SendDlgItemMessageW(hwndDlg, 14016, STM_SETICON, (WPARAM)hIcon, 0);
}
INT_PTR CALLBACK
@@ -371,7 +348,8 @@
if (pDrawItem->CtlID >= 14013 && pDrawItem->CtlID <=
14015)
{
- CDrvDefExt::PaintStaticControls(hwndDlg, pDrawItem);
+ CDrvDefExt *pDrvDefExt = (CDrvDefExt*)GetWindowLongPtr(hwndDlg,
DWLP_USER);
+ pDrvDefExt->PaintStaticControls(hwndDlg, pDrawItem);
return TRUE;
}
break;
Modified: trunk/reactos/dll/win32/shell32/drvdefext.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/drvdefex…
==============================================================================
--- trunk/reactos/dll/win32/shell32/drvdefext.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/drvdefext.h [iso-8859-1] Fri Jan 13 17:42:27 2012
@@ -30,13 +30,14 @@
public IObjectWithSite
{
private:
- static VOID PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT pDrawItem);
+ VOID PaintStaticControls(HWND hwndDlg, LPDRAWITEMSTRUCT pDrawItem);
VOID InitGeneralPage(HWND hwndDlg);
static INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
LPARAM lParam);
static INT_PTR CALLBACK ExtraPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam);
static INT_PTR CALLBACK HardwarePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam,
LPARAM lParam);
WCHAR m_wszDrive[MAX_PATH];
+ UINT m_FreeSpacePerc;
public:
CDrvDefExt();
Modified: trunk/reactos/dll/win32/shell32/filedefext.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/filedefe…
==============================================================================
--- trunk/reactos/dll/win32/shell32/filedefext.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/filedefext.cpp [iso-8859-1] Fri Jan 13 17:42:27 2012
@@ -122,64 +122,35 @@
return m_wszLang;
}
-/*************************************************************************
- *
- * SH_FormatFileSizeWithBytes
- *
- * Format a size in bytes to string.
- *
- * lpQwSize = Pointer to 64bit large integer to format
- * pszBuf = Buffer to fill with output string
- * cchBuf = size of pszBuf in characters
- *
- */
-
-LPWSTR
-SH_FormatFileSizeWithBytes(PULARGE_INTEGER lpQwSize, LPWSTR pszBuf, UINT cchBuf)
-{
+UINT
+SH_FormatInteger(LONGLONG Num, LPWSTR pwszResult, UINT cchResultMax)
+{
+ // Print the number in uniform mode
+ WCHAR wszNumber[24];
+ swprintf(wszNumber, L"%I64u", Num);
+
+ // Get system strings for decimal and thousand separators.
+ WCHAR wszDecimalSep[8], wszThousandSep[8];
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, wszDecimalSep,
_countof(wszDecimalSep));
+ GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, wszThousandSep,
_countof(wszThousandSep));
+
+ // Initialize format for printing the number in bytes
NUMBERFMTW nf;
- WCHAR szNumber[24];
- WCHAR szDecimalSep[8];
- WCHAR szThousandSep[8];
- WCHAR szGrouping[12];
- int Len, cchFormatted, i;
- size_t cchRemaining;
- LPWSTR Ptr;
-
- // Try to build first Format byte string
- if (StrFormatByteSizeW(lpQwSize->QuadPart, pszBuf, cchBuf) == NULL)
- return NULL;
-
- // If there is less bytes than 1KB, we have nothing to do
- if (lpQwSize->QuadPart < 1024)
- return pszBuf;
-
- // Print the number in uniform mode
- swprintf(szNumber, L"%I64u", lpQwSize->QuadPart);
-
- // Get system strings for decimal and thousand separators.
- GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, szDecimalSep,
sizeof(szDecimalSep) / sizeof(*szDecimalSep));
- GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, szThousandSep,
sizeof(szThousandSep) / sizeof(*szThousandSep));
-
- // Initialize format for printing the number in bytes
ZeroMemory(&nf, sizeof(nf));
- nf.NumDigits = 0;
- nf.LeadingZero = 0;
- nf.Grouping = 0;
- nf.lpDecimalSep = szDecimalSep;
- nf.lpThousandSep = szThousandSep;
- nf.NegativeOrder = 0;
+ nf.lpDecimalSep = wszDecimalSep;
+ nf.lpThousandSep = wszThousandSep;
// Get system string for groups separator
- Len = GetLocaleInfoW(LOCALE_USER_DEFAULT,
- LOCALE_SGROUPING,
- szGrouping,
- sizeof(szGrouping) / sizeof(*szGrouping));
+ WCHAR wszGrouping[12];
+ INT cchGrouping = GetLocaleInfoW(LOCALE_USER_DEFAULT,
+ LOCALE_SGROUPING,
+ wszGrouping,
+ _countof(wszGrouping));
// Convert grouping specs from string to integer
- for (i = 0; i < Len; i++)
- {
- WCHAR wch = szGrouping[i];
+ for (INT i = 0; i < cchGrouping; i++)
+ {
+ WCHAR wch = wszGrouping[i];
if (wch >= L'0' && wch <= L'9')
nf.Grouping = nf.Grouping * 10 + (wch - L'0');
@@ -192,38 +163,77 @@
else
nf.Grouping *= 10;
- // Concate " (" at the end of buffer
- Len = wcslen(pszBuf);
- Ptr = pszBuf + Len;
- cchRemaining = cchBuf - Len;
- StringCchCopyExW(Ptr, cchRemaining, L" (", &Ptr, &cchRemaining,
0);
-
- // Save formatted number of bytes in buffer
- cchFormatted = GetNumberFormatW(LOCALE_USER_DEFAULT,
+ // Format the number
+ INT cchResult = GetNumberFormatW(LOCALE_USER_DEFAULT,
0,
- szNumber,
+ wszNumber,
&nf,
- Ptr,
- cchRemaining);
-
- if (cchFormatted == 0)
+ pwszResult,
+ cchResultMax);
+
+ if (!cchResult)
+ return 0;
+
+ // GetNumberFormatW returns number of characters including UNICODE_NULL
+ return cchResult - 1;
+}
+
+UINT
+SH_FormatByteSize(LONGLONG cbSize, LPWSTR pwszResult, UINT cchResultMax)
+{
+ /* Write formated bytes count */
+ INT cchWritten = SH_FormatInteger(cbSize, pwszResult, cchResultMax);
+ if (!cchWritten)
+ return 0;
+
+ /* Copy " bytes" to buffer */
+ LPWSTR pwszEnd = pwszResult + cchWritten;
+ size_t cchRemaining = cchResultMax - cchWritten;
+ StringCchCopyExW(pwszEnd, cchRemaining, L" ", &pwszEnd,
&cchRemaining, NULL);
+ cchWritten = LoadStringW(shell32_hInstance, IDS_BYTES_FORMAT, pwszEnd,
cchRemaining);
+ cchRemaining -= cchWritten;
+
+ return cchResultMax - cchRemaining;
+}
+
+/*************************************************************************
+ *
+ * SH_FormatFileSizeWithBytes
+ *
+ * Format a size in bytes to string.
+ *
+ * lpQwSize = Pointer to 64bit large integer to format
+ * pszBuf = Buffer to fill with output string
+ * cchBuf = size of pszBuf in characters
+ *
+ */
+
+LPWSTR
+SH_FormatFileSizeWithBytes(const PULARGE_INTEGER lpQwSize, LPWSTR pwszResult, UINT
cchResultMax)
+{
+ /* Format bytes in KBs, MBs etc */
+ if (StrFormatByteSizeW(lpQwSize->QuadPart, pwszResult, cchResultMax) == NULL)
return NULL;
- // cchFormatted is number of characters including NULL - make it a real length
- --cchFormatted;
-
- // Copy ' ' to buffer
- Ptr += cchFormatted;
- cchRemaining -= cchFormatted;
- StringCchCopyExW(Ptr, cchRemaining, L" ", &Ptr, &cchRemaining, 0);
-
- // Copy 'bytes' string and remaining ')'
- Len = LoadStringW(shell32_hInstance, IDS_BYTES_FORMAT, Ptr, cchRemaining);
- Ptr += Len;
- cchRemaining -= Len;
- StringCchCopy(Ptr, cchRemaining, L")");
-
- return pszBuf;
+ /* If there is less bytes than 1KB, we have nothing to do */
+ if (lpQwSize->QuadPart < 1024)
+ return pwszResult;
+
+ /* Concate " (" */
+ UINT cchWritten = wcslen(pwszResult);
+ LPWSTR pwszEnd = pwszResult + cchWritten;
+ size_t cchRemaining = cchResultMax - cchWritten;
+ StringCchCopyExW(pwszEnd, cchRemaining, L" (", &pwszEnd,
&cchRemaining, 0);
+
+ /* Write formated bytes count */
+ cchWritten = SH_FormatByteSize(lpQwSize->QuadPart, pwszEnd, cchRemaining);
+ pwszEnd += cchWritten;
+ cchRemaining -= cchWritten;
+
+ /* Copy ")" to the buffer */
+ StringCchCopyW(pwszEnd, cchRemaining, L")");
+
+ return pwszResult;
}
/*************************************************************************
@@ -412,23 +422,32 @@
*/
BOOL
-CFileDefExt::GetFileTimeString(LPFILETIME lpFileTime, WCHAR *lpResult)
+CFileDefExt::GetFileTimeString(LPFILETIME lpFileTime, LPWSTR pwszResult, UINT cchResult)
{
FILETIME ft;
SYSTEMTIME st;
- if (lpFileTime == NULL || lpResult == NULL)
- return FALSE;
-
- if (!FileTimeToLocalFileTime(lpFileTime, &ft))
- return FALSE;
-
- FileTimeToSystemTime(&ft, &st);
-
- /* ddmmyy */
- swprintf(lpResult, L"%02hu/%02hu/%04hu %02hu:%02hu", st.wDay, st.wMonth,
st.wYear, st.wHour, st.wMinute);
-
- TRACE("result %s\n", debugstr_w(lpResult));
+ if (!FileTimeToLocalFileTime(lpFileTime, &ft) || !FileTimeToSystemTime(&ft,
&st))
+ return FALSE;
+
+ size_t cchRemaining = cchResult;
+ LPWSTR pwszEnd = pwszResult;
+ int cchWritten = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL,
pwszEnd, cchRemaining);
+ if (cchWritten)
+ --cchWritten; // GetDateFormatW returns count with terminating zero
+ else
+ ERR("GetDateFormatW failed\n");
+ cchRemaining -= cchWritten;
+ pwszEnd += cchWritten;
+
+ StringCchCopyExW(pwszEnd, cchRemaining, L", ", &pwszEnd,
&cchRemaining, 0);
+
+ cchWritten = GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &st, NULL, pwszEnd,
cchRemaining);
+ if (cchWritten)
+ --cchWritten; // GetTimeFormatW returns count with terminating zero
+ else
+ ERR("GetTimeFormatW failed\n");
+ TRACE("result %s\n", debugstr_w(pwszResult));
return TRUE;
}
@@ -509,13 +528,13 @@
CloseHandle(hFile);
- if (GetFileTimeString(&CreateTime, wszBuf))
+ if (GetFileTimeString(&CreateTime, wszBuf, _countof(wszBuf)))
SetDlgItemTextW(hwndDlg, 14015, wszBuf);
- if (GetFileTimeString(&AccessedTime, wszBuf))
+ if (GetFileTimeString(&AccessedTime, wszBuf, _countof(wszBuf)))
SetDlgItemTextW(hwndDlg, 14019, wszBuf);
- if (GetFileTimeString(&WriteTime, wszBuf))
+ if (GetFileTimeString(&WriteTime, wszBuf, _countof(wszBuf)))
SetDlgItemTextW(hwndDlg, 14017, wszBuf);
if (SH_FormatFileSizeWithBytes((PULARGE_INTEGER)&FileSize,
@@ -566,6 +585,14 @@
/* Set file created/modfied/accessed time */
InitFileSizeTime(hwndDlg);
+
+ DWORD dwAttr = GetFileAttributesW(m_wszPath);
+ if (dwAttr & FILE_ATTRIBUTE_READONLY)
+ SendDlgItemMessage(hwndDlg, 14021, BM_SETCHECK, BST_CHECKED, 0);
+ if (dwAttr & FILE_ATTRIBUTE_HIDDEN)
+ SendDlgItemMessage(hwndDlg, 14022, BM_SETCHECK, BST_CHECKED, 0);
+ if (dwAttr & FILE_ATTRIBUTE_ARCHIVE)
+ SendDlgItemMessage(hwndDlg, 14023, BM_SETCHECK, BST_CHECKED, 0);
return TRUE;
}
Modified: trunk/reactos/dll/win32/shell32/filedefext.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/filedefe…
==============================================================================
--- trunk/reactos/dll/win32/shell32/filedefext.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/filedefext.h [iso-8859-1] Fri Jan 13 17:42:27 2012
@@ -64,7 +64,7 @@
private:
VOID InitOpensWithField(HWND hwndDlg);
BOOL InitFileType(HWND hwndDlg);
- static BOOL GetFileTimeString(LPFILETIME lpFileTime, WCHAR *lpResult);
+ static BOOL GetFileTimeString(LPFILETIME lpFileTime, LPWSTR pwszResult, UINT
cchResult);
BOOL InitFilePath(HWND hwndDlg);
BOOL InitFileSizeTime(HWND hwndDlg);
BOOL InitGeneralPage(HWND hwndDlg);
Modified: trunk/reactos/dll/win32/shell32/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/lang/pl-…
==============================================================================
--- trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/lang/pl-PL.rc [iso-8859-1] Fri Jan 13 17:42:27 2012
@@ -312,9 +312,9 @@
CONTROL "", 14015, "Static", SS_OWNERDRAW, 70, 135, 100, 30
LTEXT "NapÄd %c", 14009, 100, 170, 40, 10
- PUSHBUTTON "Czyszczenie dysku", 14010, 180, 175, 50, 15, WS_TABSTOP
- CHECKBOX "Kompresja danych na dysku", 14011, 15, 205, 180, 10, WS_DISABLED
- CHECKBOX "Zezwól UsÅudze Indeksowania na zaindeksowanie tego dysku (szybkie
przeszukiwanie plików)", 14012, 15, 220, 200, 10, WS_DISABLED
+ PUSHBUTTON "Oczyszczanie dysku", 14010, 170, 175, 60, 15, WS_TABSTOP
+ CHECKBOX "Kompresuj dysk, aby zaoszczÄdziÄ miejsce na dysku", 14011, 15,
205, 180, 10, WS_DISABLED
+ CHECKBOX "Zezwalaj na indeksowanie tego dysku, aby przyÅpieszyÄ wyszukiwanie
plików", 14012, 15, 220, 200, 10, WS_DISABLED
END
DRIVE_EXTRA_DLG DIALOGEX 0, 0, 240, 230
@@ -324,13 +324,13 @@
BEGIN
GROUPBOX "Sprawdzanie bÅÄdów", -1, 5, 5, 230, 60
LTEXT "Ta opcja sprawdzi wolumin w poszukiwaniu bÅÄdów.", -1, 40, 25, 160,
20
- PUSHBUTTON "Sprawdź", 14000, 130, 45, 90, 15, WS_TABSTOP
+ PUSHBUTTON "Sprawdź...", 14000, 130, 45, 90, 15, WS_TABSTOP
GROUPBOX "Defragmentacja", -1, 5, 65, 230, 60
- LTEXT "Ta opcja zdefragmentuje pliki na woluminie", -1, 40, 85, 160, 20
- PUSHBUTTON "Defragmentuj", 14001, 130, 105, 90, 15, WS_TABSTOP
+ LTEXT "Ta opcja dokona defragmentacji plików woluminu.", -1, 40, 85, 160, 20
+ PUSHBUTTON "Defragmentuj...", 14001, 130, 105, 90, 15, WS_TABSTOP
GROUPBOX "Kopia zapasowa", -1, 5, 130, 230, 60
- LTEXT "Ta opcja wykona kopiÄ zapasowÄ
plików na woluminie.", -1, 40, 150, 160, 20
- PUSHBUTTON "Stwórz kopiÄ", 14002, 130, 170, 90, 15, WS_TABSTOP
+ LTEXT "Ta opcja wykona kopiÄ zapasowÄ
plików tego woluminu.", -1, 40, 150, 160, 20
+ PUSHBUTTON "Wykonaj kopiÄ zapasowÄ
...", 14002, 130, 170, 90, 15, WS_TABSTOP
END
DRIVE_HARDWARE_DLG DIALOGEX 0, 0, 240, 230