Coding style clean-up. No code changes.

svn path=/trunk/; revision=30090
This commit is contained in:
Eric Kohl 2007-11-03 14:39:08 +00:00
parent f9e795297b
commit ee5fa63537
10 changed files with 211 additions and 226 deletions

View file

@ -28,58 +28,49 @@ AdvancedPageProc(HWND hwndDlg,
case WM_COMMAND: case WM_COMMAND:
{ {
switch(LOWORD(wParam)) switch (LOWORD(wParam))
{ {
case IDC_PERFOR: case IDC_PERFOR:
{
DialogBox(hApplet, DialogBox(hApplet,
MAKEINTRESOURCE(IDD_VIRTMEM), MAKEINTRESOURCE(IDD_VIRTMEM),
hwndDlg, hwndDlg,
(DLGPROC)VirtMemDlgProc); (DLGPROC)VirtMemDlgProc);
} break;
break;
case IDC_USERPROFILE: case IDC_USERPROFILE:
{
DialogBox(hApplet, DialogBox(hApplet,
MAKEINTRESOURCE(IDD_USERPROFILE), MAKEINTRESOURCE(IDD_USERPROFILE),
hwndDlg, hwndDlg,
(DLGPROC)UserProfileDlgProc); (DLGPROC)UserProfileDlgProc);
} break;
break;
case IDC_STAREC: case IDC_STAREC:
{
DialogBox(hApplet, DialogBox(hApplet,
MAKEINTRESOURCE(IDD_STARTUPRECOVERY), MAKEINTRESOURCE(IDD_STARTUPRECOVERY),
hwndDlg, hwndDlg,
(DLGPROC)StartRecDlgProc); (DLGPROC)StartRecDlgProc);
} break;
break;
case IDC_ENVVAR: case IDC_ENVVAR:
{
DialogBox(hApplet, DialogBox(hApplet,
MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES), MAKEINTRESOURCE(IDD_ENVIRONMENT_VARIABLES),
hwndDlg, hwndDlg,
(DLGPROC)EnvironmentDlgProc); (DLGPROC)EnvironmentDlgProc);
} break;
break;
case IDC_ERRORREPORT: case IDC_ERRORREPORT:
{
ShellExecute(NULL, ShellExecute(NULL,
_T("open"), _T("open"),
BugLink, BugLink,
NULL, NULL,
NULL, NULL,
SW_SHOWNORMAL); SW_SHOWNORMAL);
} break;
break;
} }
} }
break; break;
} }
return FALSE; return FALSE;
} }

View file

@ -28,15 +28,15 @@ ShowLastWin32Error(HWND hWndOwner)
LastError = GetLastError(); LastError = GetLastError();
if((LastError == 0) || if ((LastError == 0) ||
!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | !FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM, FORMAT_MESSAGE_FROM_SYSTEM,
NULL, NULL,
LastError, LastError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&lpMsg, (LPTSTR)&lpMsg,
0, 0,
NULL)) NULL))
{ {
return; return;
} }
@ -91,7 +91,8 @@ SetRegTextData(HWND hwnd,
lpBuf = HeapAlloc(GetProcessHeap(), lpBuf = HeapAlloc(GetProcessHeap(),
0, 0,
BufSize); BufSize);
if (!lpBuf) return; if (!lpBuf)
return;
if (RegQueryValueEx(hKey, if (RegQueryValueEx(hKey,
Value, Value,
@ -136,7 +137,8 @@ SetProcNameString(HWND hwnd,
lpBuf = HeapAlloc(GetProcessHeap(), lpBuf = HeapAlloc(GetProcessHeap(),
0, 0,
BufSize); BufSize);
if (!lpBuf) return 0; if (!lpBuf)
return 0;
if (RegQueryValueEx(hKey, if (RegQueryValueEx(hKey,
Value, Value,
@ -145,7 +147,7 @@ SetProcNameString(HWND hwnd,
(PBYTE)lpBuf, (PBYTE)lpBuf,
&BufSize) == ERROR_SUCCESS) &BufSize) == ERROR_SUCCESS)
{ {
if(BufSize > ((30 + 1) * sizeof(TCHAR))) if (BufSize > ((30 + 1) * sizeof(TCHAR)))
{ {
/* Wrap the Processor Name String like XP does: * /* Wrap the Processor Name String like XP does: *
* - Take the first 30 characters and look for the last space. * * - Take the first 30 characters and look for the last space. *
@ -159,8 +161,10 @@ SetProcNameString(HWND hwnd,
szBuf[30] = 0; szBuf[30] = 0;
szLastSpace = _tcsrchr(szBuf, ' '); szLastSpace = _tcsrchr(szBuf, ' ');
if(szLastSpace == 0) if (szLastSpace == 0)
{
LastSpace = 30; LastSpace = 30;
}
else else
{ {
LastSpace = (szLastSpace - szBuf); LastSpace = (szLastSpace - szBuf);
@ -205,13 +209,13 @@ MakeFloatValueString(double* dFloatValue,
{ {
TCHAR szDecimalSeparator[4]; TCHAR szDecimalSeparator[4];
// Get the decimal separator for the current locale /* Get the decimal separator for the current locale */
if( GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, szDecimalSeparator, sizeof(szDecimalSeparator) / sizeof(TCHAR)) > 0) if (GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, szDecimalSeparator, sizeof(szDecimalSeparator) / sizeof(TCHAR)) > 0)
{ {
UCHAR uDecimals; UCHAR uDecimals;
UINT uIntegral; UINT uIntegral;
// Show the value with two decimals /* Show the value with two decimals */
uIntegral = (UINT)*dFloatValue; uIntegral = (UINT)*dFloatValue;
uDecimals = (UCHAR)((UINT)(*dFloatValue * 100) - uIntegral * 100); uDecimals = (UCHAR)((UINT)(*dFloatValue * 100) - uIntegral * 100);
@ -337,10 +341,14 @@ GetSystemInformation(HWND hwnd)
dTotalPhys = (double)MemStat.ullTotalPhys / 1024; dTotalPhys = (double)MemStat.ullTotalPhys / 1024;
} }
else else
{
dTotalPhys = (double)MemStat.ullTotalPhys / 1024; dTotalPhys = (double)MemStat.ullTotalPhys / 1024;
}
} }
else else
{
dTotalPhys = (double)MemStat.ullTotalPhys / 1024; dTotalPhys = (double)MemStat.ullTotalPhys / 1024;
}
LoadString(hApplet, uStrId[i], szStr, sizeof(szStr) / sizeof(TCHAR)); LoadString(hApplet, uStrId[i], szStr, sizeof(szStr) / sizeof(TCHAR));
MakeFloatValueString(&dTotalPhys, Buf, szStr); MakeFloatValueString(&dTotalPhys, Buf, szStr);
@ -369,17 +377,14 @@ GeneralPageProc(HWND hwndDlg,
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam); UNREFERENCED_PARAMETER(wParam);
switch(uMsg) switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{
InitImageInfo(&ImgInfo); InitImageInfo(&ImgInfo);
GetSystemInformation(hwndDlg); GetSystemInformation(hwndDlg);
} break;
break;
case WM_COMMAND: case WM_COMMAND:
{
if (LOWORD(wParam) == IDC_LICENCE) if (LOWORD(wParam) == IDC_LICENCE)
{ {
DialogBox(hApplet, DialogBox(hApplet,
@ -389,14 +394,13 @@ GeneralPageProc(HWND hwndDlg,
return TRUE; return TRUE;
} }
} break;
break;
case WM_DRAWITEM: case WM_DRAWITEM:
{ {
LPDRAWITEMSTRUCT lpDrawItem; LPDRAWITEMSTRUCT lpDrawItem;
lpDrawItem = (LPDRAWITEMSTRUCT) lParam; lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
if(lpDrawItem->CtlID == IDC_ROSIMG) if (lpDrawItem->CtlID == IDC_ROSIMG)
{ {
HDC hdcMem; HDC hdcMem;
LONG left; LONG left;

View file

@ -19,24 +19,21 @@ RenameProfDlgProc(HWND hwndDlg,
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam); UNREFERENCED_PARAMETER(wParam);
UNREFERENCED_PARAMETER(hwndDlg); UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0); MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
} break;
break;
case WM_COMMAND: case WM_COMMAND:
{
if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
{ {
EndDialog(hwndDlg, EndDialog(hwndDlg,
LOWORD(wParam)); LOWORD(wParam));
return TRUE; return TRUE;
} }
} break;
break;
} }
return FALSE; return FALSE;
} }
@ -52,36 +49,31 @@ HardProfDlgProc(HWND hwndDlg,
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
UNREFERENCED_PARAMETER(wParam); UNREFERENCED_PARAMETER(wParam);
UNREFERENCED_PARAMETER(hwndDlg); UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0); MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
} break;
break;
case WM_COMMAND: case WM_COMMAND:
{
switch (LOWORD(wParam)) switch (LOWORD(wParam))
{ {
case IDC_HRDPROFRENAME: case IDC_HRDPROFRENAME:
{
DialogBox(hApplet, DialogBox(hApplet,
MAKEINTRESOURCE(IDD_RENAMEPROFILE), MAKEINTRESOURCE(IDD_RENAMEPROFILE),
hwndDlg, hwndDlg,
(DLGPROC)RenameProfDlgProc); (DLGPROC)RenameProfDlgProc);
} break;
case IDOK: case IDOK:
case IDCANCEL: case IDCANCEL:
{
EndDialog(hwndDlg, EndDialog(hwndDlg,
LOWORD(wParam)); LOWORD(wParam));
return TRUE; return TRUE;
}
} }
} break;
break;
} }
return FALSE; return FALSE;
} }

View file

@ -12,7 +12,8 @@
typedef BOOL (STDCALL *PDEVMGREXEC)(HWND hWndParent, HINSTANCE hInst, PVOID Unknown, int nCmdShow); typedef BOOL (STDCALL *PDEVMGREXEC)(HWND hWndParent, HINSTANCE hInst, PVOID Unknown, int nCmdShow);
BOOL LaunchDeviceManager(HWND hWndParent) static BOOL
LaunchDeviceManager(HWND hWndParent)
{ {
/* hack for ROS to start our devmgmt until we have mmc */ /* hack for ROS to start our devmgmt until we have mmc */
#ifdef __REACTOS__ #ifdef __REACTOS__
@ -49,37 +50,29 @@ HardwarePageProc(HWND hwndDlg,
{ {
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
switch(uMsg) switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
break; break;
case WM_COMMAND: case WM_COMMAND:
{ switch (LOWORD(wParam))
switch(LOWORD(wParam))
{ {
case IDC_HARDWARE_DEVICE_MANAGER: case IDC_HARDWARE_DEVICE_MANAGER:
{ if (!LaunchDeviceManager(hwndDlg))
if(!LaunchDeviceManager(hwndDlg))
{ {
/* FIXME */ /* FIXME */
} }
return TRUE; return TRUE;
}
case IDC_HARDWARE_PROFILE: case IDC_HARDWARE_PROFILE:
{
DialogBox(hApplet, DialogBox(hApplet,
MAKEINTRESOURCE(IDD_HARDWAREPROFILES), MAKEINTRESOURCE(IDD_HARDWAREPROFILES),
hwndDlg, hwndDlg,
(DLGPROC)HardProfDlgProc); (DLGPROC)HardProfDlgProc);
return TRUE; return TRUE;
}
} }
} break;
break;
} }
return FALSE; return FALSE;

View file

@ -12,7 +12,7 @@
INT_PTR CALLBACK INT_PTR CALLBACK
LicenceDlgProc(HWND hDlg, LicenceDlgProc(HWND hDlg,
UINT message, UINT uMsg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam) LPARAM lParam)
{ {
@ -23,10 +23,9 @@ LicenceDlgProc(HWND hDlg,
UNREFERENCED_PARAMETER(lParam); UNREFERENCED_PARAMETER(lParam);
switch (message) switch (uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{
hIcon = LoadImage(hApplet, hIcon = LoadImage(hApplet,
MAKEINTRESOURCE(IDI_CPLSYSTEM), MAKEINTRESOURCE(IDI_CPLSYSTEM),
IMAGE_ICON, IMAGE_ICON,
@ -61,10 +60,8 @@ LicenceDlgProc(HWND hDlg,
0); 0);
return TRUE; return TRUE;
}
case WM_COMMAND: case WM_COMMAND:
{
if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
{ {
DestroyIcon(hIcon); DestroyIcon(hIcon);
@ -72,8 +69,7 @@ LicenceDlgProc(HWND hDlg,
LOWORD(wParam)); LOWORD(wParam));
return TRUE; return TRUE;
} }
} break;
break;
} }
return FALSE; return FALSE;

View file

@ -40,10 +40,10 @@
/* propsheet - hardware */ /* propsheet - hardware */
#define IDD_PROPPAGEHARDWARE 300 #define IDD_PROPPAGEHARDWARE 300
#define IDC_HARDWARE_WIZARD 207 #define IDC_HARDWARE_WIZARD 207
#define IDC_HARDWARE_PROFILE 209 #define IDC_HARDWARE_PROFILE 209
#define IDC_HARDWARE_DRIVER_SIGN 210 #define IDC_HARDWARE_DRIVER_SIGN 210
#define IDC_HARDWARE_DEVICE_MANAGER 211 #define IDC_HARDWARE_DEVICE_MANAGER 211
/* propsheet - advanced */ /* propsheet - advanced */

View file

@ -1,4 +1,3 @@
/* /*
* PROJECT: ReactOS System Control Panel Applet * PROJECT: ReactOS System Control Panel Applet
* LICENSE: GPL - See COPYING in the top level directory * LICENSE: GPL - See COPYING in the top level directory
@ -16,7 +15,8 @@ static TCHAR m_szDumpFile[MAX_PATH];
static TCHAR m_szMinidumpDir[MAX_PATH]; static TCHAR m_szMinidumpDir[MAX_PATH];
static DWORD m_dwCrashDumpEnabled = 0; static DWORD m_dwCrashDumpEnabled = 0;
void SetTimeout(HWND hwndDlg, int Timeout) static VOID
SetTimeout(HWND hwndDlg, INT Timeout)
{ {
if (Timeout == 0) if (Timeout == 0)
{ {
@ -26,12 +26,15 @@ void SetTimeout(HWND hwndDlg, int Timeout)
{ {
EnableWindow(GetDlgItem(hwndDlg, IDC_STRRECLISTUPDWN), TRUE); EnableWindow(GetDlgItem(hwndDlg, IDC_STRRECLISTUPDWN), TRUE);
} }
SendDlgItemMessage(hwndDlg, IDC_STRRECLISTUPDWN, UDM_SETPOS, (WPARAM) 0, (LPARAM) MAKELONG((short) Timeout, 0)); SendDlgItemMessage(hwndDlg, IDC_STRRECLISTUPDWN, UDM_SETPOS, (WPARAM) 0, (LPARAM) MAKELONG((short) Timeout, 0));
} }
DWORD GetSystemDrive(TCHAR ** szSystemDrive) static DWORD
GetSystemDrive(TCHAR **szSystemDrive)
{ {
DWORD dwBufSize; DWORD dwBufSize;
/* get Path to freeldr.ini or boot.ini */ /* get Path to freeldr.ini or boot.ini */
*szSystemDrive = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(TCHAR)); *szSystemDrive = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(TCHAR));
if (szSystemDrive != NULL) if (szSystemDrive != NULL)
@ -59,34 +62,38 @@ FailGetSysDrive:
*szSystemDrive = NULL; *szSystemDrive = NULL;
return FALSE; return FALSE;
} }
return dwBufSize; return dwBufSize;
} }
return FALSE; return FALSE;
} }
PBOOTRECORD ReadFreeldrSection(HINF hInf, TCHAR * szSectionName) static PBOOTRECORD
ReadFreeldrSection(HINF hInf, TCHAR *szSectionName)
{ {
PBOOTRECORD pRecord; PBOOTRECORD pRecord;
INFCONTEXT InfContext; INFCONTEXT InfContext;
TCHAR szName[MAX_PATH]; TCHAR szName[MAX_PATH];
TCHAR szValue[MAX_PATH]; TCHAR szValue[MAX_PATH];
DWORD LineLength; DWORD LineLength;
if (!SetupFindFirstLine(hInf, if (!SetupFindFirstLine(hInf,
szSectionName, szSectionName,
NULL, NULL,
&InfContext)) &InfContext))
{ {
/* failed to find section */ /* failed to find section */
return NULL; return NULL;
} }
pRecord = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOTRECORD)); pRecord = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOTRECORD));
if (pRecord == NULL) if (pRecord == NULL)
{ {
return NULL; return NULL;
} }
_tcscpy(pRecord->szSectionName, szSectionName);
_tcscpy(pRecord->szSectionName, szSectionName);
do do
{ {
@ -108,7 +115,6 @@ PBOOTRECORD ReadFreeldrSection(HINF hInf, TCHAR * szSectionName)
break; break;
} }
if (!_tcsnicmp(szName, _T("BootType"), 8)) if (!_tcsnicmp(szName, _T("BootType"), 8))
{ {
if (!_tcsnicmp(szValue, _T("ReactOS"), 7)) if (!_tcsnicmp(szValue, _T("ReactOS"), 7))
@ -131,13 +137,15 @@ PBOOTRECORD ReadFreeldrSection(HINF hInf, TCHAR * szSectionName)
_tcscpy(pRecord->szOptions, szValue); _tcscpy(pRecord->szOptions, szValue);
} }
}while(SetupFindNextLine(&InfContext, &InfContext)); }
while (SetupFindNextLine(&InfContext, &InfContext));
return pRecord; return pRecord;
} }
int LoadFreeldrSettings(HINF hInf, HWND hwndDlg) static INT
LoadFreeldrSettings(HINF hInf, HWND hwndDlg)
{ {
INFCONTEXT InfContext; INFCONTEXT InfContext;
PBOOTRECORD pRecord; PBOOTRECORD pRecord;
@ -228,15 +236,14 @@ int LoadFreeldrSettings(HINF hInf, HWND hwndDlg)
/* we store the friendly name as key */ /* we store the friendly name as key */
_tcscpy(szDefaultOs, szValue); _tcscpy(szDefaultOs, szValue);
} }
} }
else else
{ {
HeapFree(GetProcessHeap(), 0, pRecord); HeapFree(GetProcessHeap(), 0, pRecord);
} }
} }
}
}while(SetupFindNextLine(&InfContext, &InfContext)); while (SetupFindNextLine(&InfContext, &InfContext));
/* find default os in list */ /* find default os in list */
lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)-1, (LPARAM)szDefaultOs); lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)-1, (LPARAM)szDefaultOs);
@ -250,11 +257,14 @@ int LoadFreeldrSettings(HINF hInf, HWND hwndDlg)
{ {
SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
} }
SetTimeout(hwndDlg, TimeOut); SetTimeout(hwndDlg, TimeOut);
return TRUE; return TRUE;
} }
int LoadBootSettings(HINF hInf, HWND hwndDlg) static INT
LoadBootSettings(HINF hInf, HWND hwndDlg)
{ {
INFCONTEXT InfContext; INFCONTEXT InfContext;
TCHAR szName[MAX_PATH]; TCHAR szName[MAX_PATH];
@ -304,7 +314,8 @@ int LoadBootSettings(HINF hInf, HWND hwndDlg)
_tcscpy(szDefaultOS, szValue); _tcscpy(szDefaultOS, szValue);
} }
}while(SetupFindNextLine(&InfContext, &InfContext)); }
while (SetupFindNextLine(&InfContext, &InfContext));
if (!SetupFindFirstLine(hInf, if (!SetupFindFirstLine(hInf,
_T("operating systems"), _T("operating systems"),
@ -366,7 +377,9 @@ int LoadBootSettings(HINF hInf, HWND hwndDlg)
} }
} }
}while(SetupFindNextLine(&InfContext, &InfContext)); }
while (SetupFindNextLine(&InfContext, &InfContext));
/* find default os in list */ /* find default os in list */
lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)0, (LPARAM)szDefaultOS); lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)0, (LPARAM)szDefaultOS);
if (lResult != CB_ERR) if (lResult != CB_ERR)
@ -374,22 +387,24 @@ int LoadBootSettings(HINF hInf, HWND hwndDlg)
/* set cur sel */ /* set cur sel */
SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0);
} }
if(TimeOut) if(TimeOut)
{ {
SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
} }
SetTimeout(hwndDlg, TimeOut); SetTimeout(hwndDlg, TimeOut);
return TRUE; return TRUE;
} }
void DeleteBootRecords(HWND hwndDlg) static VOID
DeleteBootRecords(HWND hwndDlg)
{ {
LRESULT lIndex; LRESULT lIndex;
LONG index; LONG index;
PBOOTRECORD pRecord; PBOOTRECORD pRecord;
lIndex = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETCOUNT, (WPARAM)0, (LPARAM)0); lIndex = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETCOUNT, (WPARAM)0, (LPARAM)0);
if (lIndex == CB_ERR) if (lIndex == CB_ERR)
return; return;
@ -402,10 +417,12 @@ void DeleteBootRecords(HWND hwndDlg)
HeapFree(GetProcessHeap(), 0, pRecord); HeapFree(GetProcessHeap(), 0, pRecord);
} }
} }
SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0); SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0);
} }
LRESULT LoadOSList(HWND hwndDlg) static LRESULT
LoadOSList(HWND hwndDlg)
{ {
DWORD dwBufSize; DWORD dwBufSize;
TCHAR *szSystemDrive; TCHAR *szSystemDrive;
@ -415,9 +432,9 @@ LRESULT LoadOSList(HWND hwndDlg)
if (!dwBufSize) if (!dwBufSize)
return FALSE; return FALSE;
_tcscpy(m_szFreeldrIni, szSystemDrive); _tcscpy(m_szFreeldrIni, szSystemDrive);
_tcscat(m_szFreeldrIni, _T("\\freeldr.ini")); _tcscat(m_szFreeldrIni, _T("\\freeldr.ini"));
if (PathFileExists(m_szFreeldrIni)) if (PathFileExists(m_szFreeldrIni))
{ {
/* freeldr.ini exists */ /* freeldr.ini exists */
@ -435,6 +452,7 @@ LRESULT LoadOSList(HWND hwndDlg)
} }
return FALSE; return FALSE;
} }
/* try load boot.ini settings */ /* try load boot.ini settings */
_tcscpy(m_szFreeldrIni, szSystemDrive); _tcscpy(m_szFreeldrIni, szSystemDrive);
_tcscat(m_szFreeldrIni, _T("\\boot.ini")); _tcscat(m_szFreeldrIni, _T("\\boot.ini"));
@ -454,12 +472,15 @@ LRESULT LoadOSList(HWND hwndDlg)
m_FreeLdrIni = 2; m_FreeLdrIni = 2;
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }
return FALSE; return FALSE;
} }
void SetCrashDlgItems(HWND hwnd) static VOID
SetCrashDlgItems(HWND hwnd)
{ {
if (m_dwCrashDumpEnabled == 0) if (m_dwCrashDumpEnabled == 0)
{ {
@ -484,7 +505,8 @@ void SetCrashDlgItems(HWND hwnd)
SendDlgItemMessage(hwnd, IDC_STRRECDEBUGCOMBO, CB_SETCURSEL, (WPARAM)m_dwCrashDumpEnabled, (LPARAM)0); SendDlgItemMessage(hwnd, IDC_STRRECDEBUGCOMBO, CB_SETCURSEL, (WPARAM)m_dwCrashDumpEnabled, (LPARAM)0);
} }
void WriteStartupRecoveryOptions(HWND hwndDlg) static VOID
WriteStartupRecoveryOptions(HWND hwndDlg)
{ {
HKEY hKey; HKEY hKey;
DWORD lResult; DWORD lResult;
@ -526,7 +548,8 @@ void WriteStartupRecoveryOptions(HWND hwndDlg)
RegCloseKey(hKey); RegCloseKey(hKey);
} }
void LoadRecoveryOptions(HWND hwndDlg) static VOID
LoadRecoveryOptions(HWND hwndDlg)
{ {
HKEY hKey; HKEY hKey;
DWORD dwValues; DWORD dwValues;
@ -617,10 +640,13 @@ void LoadRecoveryOptions(HWND hwndDlg)
if (LoadString(hApplet, IDS_NO_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) if (LoadString(hApplet, IDS_NO_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR))
SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue);
if (LoadString(hApplet, IDS_FULL_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) if (LoadString(hApplet, IDS_FULL_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR))
SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue);
if (LoadString(hApplet, IDS_KERNEL_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) if (LoadString(hApplet, IDS_KERNEL_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR))
SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue);
if (LoadString(hApplet, IDS_MINI_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) if (LoadString(hApplet, IDS_MINI_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR))
SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue);
@ -629,7 +655,6 @@ void LoadRecoveryOptions(HWND hwndDlg)
} }
/* Property page dialog callback */ /* Property page dialog callback */
INT_PTR CALLBACK INT_PTR CALLBACK
StartRecDlgProc(HWND hwndDlg, StartRecDlgProc(HWND hwndDlg,
@ -647,26 +672,20 @@ StartRecDlgProc(HWND hwndDlg,
switch(uMsg) switch(uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{
LoadRecoveryOptions(hwndDlg); LoadRecoveryOptions(hwndDlg);
return LoadOSList(hwndDlg); return LoadOSList(hwndDlg);
}
break;
case WM_COMMAND: case WM_COMMAND:
{
switch(LOWORD(wParam)) switch(LOWORD(wParam))
{ {
case IDC_STRRECEDIT: case IDC_STRRECEDIT:
{
ShellExecute(0, _T("open"), _T("notepad"), m_szFreeldrIni, NULL, SW_SHOWNORMAL); ShellExecute(0, _T("open"), _T("notepad"), m_szFreeldrIni, NULL, SW_SHOWNORMAL);
// FIXME use CreateProcess and wait untill finished // FIXME use CreateProcess and wait untill finished
// DeleteBootRecords(hwndDlg); // DeleteBootRecords(hwndDlg);
// LoadOSList(hwndDlg); // LoadOSList(hwndDlg);
break; break;
}
case IDOK: case IDOK:
{
/* save timeout */ /* save timeout */
if (SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_GETCHECK, (WPARAM)0, (LPARAM)0) == BST_CHECKED) if (SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_GETCHECK, (WPARAM)0, (LPARAM)0) == BST_CHECKED)
iTimeout = SendDlgItemMessage(hwndDlg, IDC_STRRECLISTUPDWN, UDM_GETPOS, (WPARAM)0, (LPARAM)0); iTimeout = SendDlgItemMessage(hwndDlg, IDC_STRRECLISTUPDWN, UDM_GETPOS, (WPARAM)0, (LPARAM)0);
@ -682,7 +701,6 @@ StartRecDlgProc(HWND hwndDlg,
return TRUE; return TRUE;
} }
pRecord = (PBOOTRECORD) SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETITEMDATA, (WPARAM)lResult, (LPARAM)0); pRecord = (PBOOTRECORD) SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETITEMDATA, (WPARAM)lResult, (LPARAM)0);
if ((INT)pRecord != CB_ERR) if ((INT)pRecord != CB_ERR)
@ -716,28 +734,27 @@ StartRecDlgProc(HWND hwndDlg,
} }
} }
WriteStartupRecoveryOptions(hwndDlg); WriteStartupRecoveryOptions(hwndDlg);
DeleteBootRecords(hwndDlg); DeleteBootRecords(hwndDlg);
EndDialog(hwndDlg, EndDialog(hwndDlg,
LOWORD(wParam)); LOWORD(wParam));
return TRUE; return TRUE;
}
case IDCANCEL: case IDCANCEL:
{
DeleteBootRecords(hwndDlg); DeleteBootRecords(hwndDlg);
EndDialog(hwndDlg, EndDialog(hwndDlg,
LOWORD(wParam)); LOWORD(wParam));
return TRUE; return TRUE;
}
case IDC_STRECLIST: case IDC_STRECLIST:
{
if (SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_GETCHECK, (WPARAM)0, (LPARAM)0) == BST_CHECKED) if (SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_GETCHECK, (WPARAM)0, (LPARAM)0) == BST_CHECKED)
SetTimeout(hwndDlg, 30); SetTimeout(hwndDlg, 30);
else else
SetTimeout(hwndDlg, 0); SetTimeout(hwndDlg, 0);
} break;
case IDC_STRRECDEBUGCOMBO: case IDC_STRRECDEBUGCOMBO:
{
if (HIWORD(wParam) == CBN_SELCHANGE) if (HIWORD(wParam) == CBN_SELCHANGE)
{ {
LRESULT lResult; LRESULT lResult;
@ -753,16 +770,15 @@ StartRecDlgProc(HWND hwndDlg,
{ {
SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szMinidumpDir) / sizeof(TCHAR), (LPARAM)m_szMinidumpDir); SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szMinidumpDir) / sizeof(TCHAR), (LPARAM)m_szMinidumpDir);
} }
m_dwCrashDumpEnabled = lResult; m_dwCrashDumpEnabled = lResult;
SetCrashDlgItems(hwndDlg); SetCrashDlgItems(hwndDlg);
} }
} }
break; break;
}
} }
} break;
break;
} }
return FALSE; return FALSE;
} }

View file

@ -148,57 +148,56 @@ SystemApplet(VOID)
/* Control Panel Callback */ /* Control Panel Callback */
LONG CALLBACK LONG CALLBACK
CPlApplet( CPlApplet(HWND hwndCPl,
HWND hwndCPl, UINT uMsg,
UINT uMsg, LPARAM lParam1,
LPARAM lParam1, LPARAM lParam2)
LPARAM lParam2)
{ {
int i = (int)lParam1; INT i = (INT)lParam1;
UNREFERENCED_PARAMETER(hwndCPl); UNREFERENCED_PARAMETER(hwndCPl);
switch(uMsg) switch (uMsg)
{ {
case CPL_INIT: case CPL_INIT:
{
return TRUE; return TRUE;
}
case CPL_GETCOUNT: case CPL_GETCOUNT:
{
return NUM_APPLETS; return NUM_APPLETS;
}
case CPL_INQUIRE: case CPL_INQUIRE:
{ {
CPLINFO *CPlInfo = (CPLINFO*)lParam2; CPLINFO *CPlInfo = (CPLINFO*)lParam2;
CPlInfo->lData = 0; CPlInfo->lData = 0;
CPlInfo->idIcon = Applets[i].idIcon; CPlInfo->idIcon = Applets[i].idIcon;
CPlInfo->idName = Applets[i].idName; CPlInfo->idName = Applets[i].idName;
CPlInfo->idInfo = Applets[i].idDescription; CPlInfo->idInfo = Applets[i].idDescription;
}
break; break;
}
case CPL_DBLCLK: case CPL_DBLCLK:
{
Applets[i].AppletProc(); Applets[i].AppletProc();
break; break;
}
} }
return FALSE; return FALSE;
} }
BOOL STDCALL BOOL STDCALL
DllMain( DllMain(HINSTANCE hinstDLL,
HINSTANCE hinstDLL, DWORD dwReason,
DWORD dwReason, LPVOID lpvReserved)
LPVOID lpvReserved)
{ {
UNREFERENCED_PARAMETER(lpvReserved); UNREFERENCED_PARAMETER(lpvReserved);
switch(dwReason)
switch (dwReason)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH: case DLL_THREAD_ATTACH:
hApplet = hinstDLL; hApplet = hinstDLL;
break; break;
} }
return TRUE; return TRUE;
} }

View file

@ -17,28 +17,20 @@ UserProfileDlgProc(HWND hwndDlg,
WPARAM wParam, WPARAM wParam,
LPARAM lParam) LPARAM lParam)
{ {
UNREFERENCED_PARAMETER(lParam); switch (uMsg)
UNREFERENCED_PARAMETER(wParam);
UNREFERENCED_PARAMETER(hwndDlg);
switch(uMsg)
{ {
case WM_INITDIALOG: case WM_INITDIALOG:
{
MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0); MessageBox(hwndDlg, _T("Dialog not yet implemented!"), NULL, 0);
} break;
break;
case WM_COMMAND: case WM_COMMAND:
{
if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL)) if ((LOWORD(wParam) == IDOK) || (LOWORD(wParam) == IDCANCEL))
{ {
EndDialog(hwndDlg, EndDialog(hwndDlg,
LOWORD(wParam)); LOWORD(wParam));
return TRUE; return TRUE;
} }
} break;
break;
case WM_NOTIFY: case WM_NOTIFY:
{ {
@ -56,5 +48,6 @@ UserProfileDlgProc(HWND hwndDlg,
break; break;
} }
} }
return FALSE; return FALSE;
} }

View file

@ -20,22 +20,22 @@ ReadPageFileSettings(PVIRTMEM pVirtMem)
DWORD dwDataSize; DWORD dwDataSize;
BOOL bRet = FALSE; BOOL bRet = FALSE;
if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, if (RegCreateKeyEx(HKEY_LOCAL_MACHINE,
lpKey, lpKey,
0, 0,
NULL, NULL,
REG_OPTION_NON_VOLATILE, REG_OPTION_NON_VOLATILE,
KEY_QUERY_VALUE, KEY_QUERY_VALUE,
NULL, NULL,
&hkey, &hkey,
NULL) == ERROR_SUCCESS) NULL) == ERROR_SUCCESS)
{ {
if(RegQueryValueEx(hkey, if (RegQueryValueEx(hkey,
_T("PagingFiles"), _T("PagingFiles"),
NULL, NULL,
&dwType, &dwType,
NULL, NULL,
&dwDataSize) == ERROR_SUCCESS) &dwDataSize) == ERROR_SUCCESS)
{ {
pVirtMem->szPagingFiles = (LPTSTR)HeapAlloc(GetProcessHeap(), pVirtMem->szPagingFiles = (LPTSTR)HeapAlloc(GetProcessHeap(),
0, 0,
@ -44,12 +44,12 @@ ReadPageFileSettings(PVIRTMEM pVirtMem)
{ {
ZeroMemory(pVirtMem->szPagingFiles, ZeroMemory(pVirtMem->szPagingFiles,
dwDataSize); dwDataSize);
if(RegQueryValueEx(hkey, if (RegQueryValueEx(hkey,
_T("PagingFiles"), _T("PagingFiles"),
NULL, NULL,
&dwType, &dwType,
(PBYTE)pVirtMem->szPagingFiles, (PBYTE)pVirtMem->szPagingFiles,
&dwDataSize) == ERROR_SUCCESS) &dwDataSize) == ERROR_SUCCESS)
{ {
bRet = TRUE; bRet = TRUE;
} }
@ -117,10 +117,10 @@ ParseMemSettings(PVIRTMEM pVirtMem)
/* copy the 'X:' portion */ /* copy the 'X:' portion */
lstrcpyn(szDrive, DrivePtr, sizeof(szDrive) / sizeof(TCHAR)); lstrcpyn(szDrive, DrivePtr, sizeof(szDrive) / sizeof(TCHAR));
if(GetDriveType(DrivePtr) == DRIVE_FIXED) if (GetDriveType(DrivePtr) == DRIVE_FIXED)
{ {
/* does drive match the one in the registry ? */ /* does drive match the one in the registry ? */
if(!_tcsncmp(pVirtMem->szPagingFiles, szDrive, 2)) if (!_tcsncmp(pVirtMem->szPagingFiles, szDrive, 2))
{ {
/* FIXME: we only check the first available pagefile in the reg */ /* FIXME: we only check the first available pagefile in the reg */
InitialSize = GetPageFileSizes(pVirtMem->szPagingFiles); InitialSize = GetPageFileSizes(pVirtMem->szPagingFiles);
@ -188,16 +188,15 @@ WritePageFileSettings(PVIRTMEM pVirtMem)
{ {
HKEY hk = NULL; HKEY hk = NULL;
TCHAR szPagingFiles[2048]; TCHAR szPagingFiles[2048];
TCHAR szText[256];
INT i; INT i;
INT nPos = 0; INT nPos = 0;
BOOL bErr = TRUE; BOOL bErr = TRUE;
for(i = 0; i < pVirtMem->Count; ++i) for (i = 0; i < pVirtMem->Count; ++i)
{ {
if(pVirtMem->Pagefile[i].bUsed) if (pVirtMem->Pagefile[i].bUsed)
{ {
TCHAR szText[256];
_stprintf(szText, _T("%s\\pagefile.sys %i %i"), _stprintf(szText, _T("%s\\pagefile.sys %i %i"),
pVirtMem->Pagefile[i].szDrive, pVirtMem->Pagefile[i].szDrive,
pVirtMem->Pagefile[i].InitialValue, pVirtMem->Pagefile[i].InitialValue,
@ -215,15 +214,15 @@ WritePageFileSettings(PVIRTMEM pVirtMem)
} }
} }
if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, if (RegCreateKeyEx(HKEY_LOCAL_MACHINE,
lpKey, lpKey,
0, 0,
NULL, NULL,
REG_OPTION_NON_VOLATILE, REG_OPTION_NON_VOLATILE,
KEY_WRITE, KEY_WRITE,
NULL, NULL,
&hk, &hk,
NULL) == ERROR_SUCCESS) NULL) == ERROR_SUCCESS)
{ {
if (RegSetValueEx(hk, if (RegSetValueEx(hk,
_T("PagingFiles"), _T("PagingFiles"),
@ -247,6 +246,7 @@ static VOID
SetListBoxColumns(HWND hwndListBox) SetListBoxColumns(HWND hwndListBox)
{ {
const INT tabs[2] = {30, 170}; const INT tabs[2] = {30, 170};
SendMessage(hwndListBox, LB_SETTABSTOPS, (WPARAM)2, (LPARAM)&tabs[0]); SendMessage(hwndListBox, LB_SETTABSTOPS, (WPARAM)2, (LPARAM)&tabs[0]);
} }
@ -292,12 +292,11 @@ OnSet(PVIRTMEM pVirtMem)
LB_GETCURSEL, LB_GETCURSEL,
0, 0,
0); 0);
if (Index < pVirtMem->Count)
if(Index < pVirtMem->Count)
{ {
/* check if custom settings are checked */ /* check if custom settings are checked */
if(IsDlgButtonChecked(pVirtMem->hSelf, if (IsDlgButtonChecked(pVirtMem->hSelf,
IDC_CUSTOM) == BST_CHECKED) IDC_CUSTOM) == BST_CHECKED)
{ {
Value = GetDlgItemInt(pVirtMem->hSelf, Value = GetDlgItemInt(pVirtMem->hSelf,
IDC_INITIALSIZE, IDC_INITIALSIZE,
@ -313,7 +312,9 @@ OnSet(PVIRTMEM pVirtMem)
FALSE); FALSE);
} }
else else
{
pVirtMem->Pagefile[Index].InitialValue = Value; pVirtMem->Pagefile[Index].InitialValue = Value;
}
Value = GetDlgItemInt(pVirtMem->hSelf, Value = GetDlgItemInt(pVirtMem->hSelf,
IDC_MAXSIZE, IDC_MAXSIZE,
@ -329,7 +330,9 @@ OnSet(PVIRTMEM pVirtMem)
FALSE); FALSE);
} }
else else
{
pVirtMem->Pagefile[Index].MaxValue = Value; pVirtMem->Pagefile[Index].MaxValue = Value;
}
} }
else else
{ {
@ -362,11 +365,11 @@ OnSelChange(PVIRTMEM pVirtMem)
0, 0,
0); 0);
if(Index < pVirtMem->Count) if (Index < pVirtMem->Count)
{ {
if(pVirtMem->Pagefile[Index].InitialValue != 0 && if (pVirtMem->Pagefile[Index].InitialValue != 0 &&
pVirtMem->Pagefile[Index].MaxValue != 0) pVirtMem->Pagefile[Index].MaxValue != 0)
{ {
/* enable and fill the custom values */ /* enable and fill the custom values */
EnableWindow(GetDlgItem(pVirtMem->hSelf, IDC_MAXSIZE), TRUE); EnableWindow(GetDlgItem(pVirtMem->hSelf, IDC_MAXSIZE), TRUE);
@ -393,7 +396,7 @@ OnSelChange(PVIRTMEM pVirtMem)
EnableWindow(GetDlgItem(pVirtMem->hSelf, IDC_INITIALSIZE), FALSE); EnableWindow(GetDlgItem(pVirtMem->hSelf, IDC_INITIALSIZE), FALSE);
/* is it system managed */ /* is it system managed */
if(pVirtMem->Pagefile[Index].bUsed) if (pVirtMem->Pagefile[Index].bUsed)
{ {
CheckDlgButton(pVirtMem->hSelf, CheckDlgButton(pVirtMem->hSelf,
IDC_SYSMANSIZE, IDC_SYSMANSIZE,
@ -415,7 +418,7 @@ OnSelChange(PVIRTMEM pVirtMem)
static VOID static VOID
OnOk(PVIRTMEM pVirtMem) OnOk(PVIRTMEM pVirtMem)
{ {
if(pVirtMem->bSave == TRUE) if (pVirtMem->bSave == TRUE)
{ {
WritePageFileSettings(pVirtMem); WritePageFileSettings(pVirtMem);
} }
@ -491,7 +494,6 @@ VirtMemDlgProc(HWND hwndDlg,
break; break;
case WM_COMMAND: case WM_COMMAND:
{
switch (LOWORD(wParam)) switch (LOWORD(wParam))
{ {
case IDCANCEL: case IDCANCEL:
@ -529,8 +531,7 @@ VirtMemDlgProc(HWND hwndDlg,
} }
break; break;
} }
} break;
break;
} }
return FALSE; return FALSE;