mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[POWERCFG] Fix indentation and coding style. No code changes!
This commit is contained in:
parent
8fb2a2dd12
commit
22411ef223
2 changed files with 94 additions and 81 deletions
|
@ -49,6 +49,7 @@ AddItem(HWND hDlgCtrl, INT ResourceId, LPARAM lParam, POWER_ACTION * lpAction)
|
|||
{
|
||||
TCHAR szBuffer[MAX_PATH];
|
||||
LRESULT Index;
|
||||
|
||||
if (LoadString(hApplet, ResourceId, szBuffer, MAX_PATH) < MAX_PATH)
|
||||
{
|
||||
Index = SendMessage(hDlgCtrl, CB_ADDSTRING, 0, (LPARAM)szBuffer);
|
||||
|
@ -179,22 +180,27 @@ SaveCurrentPowerActionPolicy(IN HWND hDlgCtrl,
|
|||
Policy->Action = PowerActionNone;
|
||||
Policy->EventCode = POWER_FORCE_TRIGGER_RESET;
|
||||
break;
|
||||
|
||||
case PowerActionWarmEject:
|
||||
Policy->Action = PowerActionNone;
|
||||
Policy->EventCode = POWER_USER_NOTIFY_BUTTON;
|
||||
break;
|
||||
|
||||
case PowerActionShutdown:
|
||||
Policy->Action = PowerActionNone;
|
||||
Policy->EventCode = POWER_USER_NOTIFY_SHUTDOWN;
|
||||
break;
|
||||
|
||||
case PowerActionSleep:
|
||||
case PowerActionHibernate:
|
||||
Policy->Action = (POWER_ACTION)ItemData;
|
||||
Policy->EventCode = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Policy->Flags = (POWER_ACTION_UI_ALLOWED | POWER_ACTION_QUERY_ALLOWED);
|
||||
|
||||
return TRUE;
|
||||
|
@ -372,8 +378,8 @@ Adv_InitDialog(VOID)
|
|||
if (bHibernate)
|
||||
{
|
||||
AddItem(hList2, IDS_PowerActionHibernate, (LPARAM)PowerActionHibernate, g_PowerButton);
|
||||
|
||||
}
|
||||
|
||||
if (bShutdown)
|
||||
{
|
||||
AddItem(hList2, IDS_PowerActionShutdown, (LPARAM)PowerActionShutdown, g_PowerButton);
|
||||
|
@ -516,15 +522,15 @@ AdvancedDlgProc(HWND hwndDlg,
|
|||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
hAdv = hwndDlg;
|
||||
Adv_InitDialog();
|
||||
return TRUE;
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_SYSTRAYBATTERYMETER:
|
||||
case IDC_PASSWORDLOGON:
|
||||
|
@ -534,6 +540,7 @@ AdvancedDlgProc(HWND hwndDlg,
|
|||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||
}
|
||||
break;
|
||||
|
||||
case IDC_LIDCLOSE:
|
||||
case IDC_POWERBUTTON:
|
||||
case IDC_SLEEPBUTTON:
|
||||
|
@ -544,6 +551,7 @@ AdvancedDlgProc(HWND hwndDlg,
|
|||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||
|
@ -554,5 +562,6 @@ AdvancedDlgProc(HWND hwndDlg,
|
|||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ Hib_SaveData(HWND hwndDlg)
|
|||
|
||||
bHibernate = (BOOLEAN)(IsDlgButtonChecked(hwndDlg, IDC_HIBERNATEFILE) == BST_CHECKED);
|
||||
|
||||
if (CallNtPowerInformation(SystemReserveHiberFile,&bHibernate, sizeof(bHibernate), NULL, 0) == STATUS_SUCCESS)
|
||||
if (CallNtPowerInformation(SystemReserveHiberFile, &bHibernate, sizeof(bHibernate), NULL, 0) == STATUS_SUCCESS)
|
||||
{
|
||||
Pos_InitData();
|
||||
Adv_InitDialog();
|
||||
|
@ -91,21 +91,24 @@ HibernateDlgProc(HWND hwndDlg,
|
|||
WPARAM wParam,
|
||||
LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
Hib_InitDialog(hwndDlg);
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(LOWORD(wParam))
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_HIBERNATEFILE:
|
||||
if (HIWORD(wParam) == BN_CLICKED)
|
||||
{
|
||||
PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_NOTIFY:
|
||||
{
|
||||
LPNMHDR lpnm = (LPNMHDR)lParam;
|
||||
|
@ -115,5 +118,6 @@ HibernateDlgProc(HWND hwndDlg,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue