https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2872cfc3b7dc2547225fb…
commit 2872cfc3b7dc2547225fbe32104efcb24e0aac7f
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Wed May 1 13:16:00 2019 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Wed May 1 13:16:38 2019 +0200
[POWERCFG] Fix indentation. No code changes!
---
dll/cpl/powercfg/powercfg.c | 161 +++++++++++++++++++++++---------------------
1 file changed, 84 insertions(+), 77 deletions(-)
diff --git a/dll/cpl/powercfg/powercfg.c b/dll/cpl/powercfg/powercfg.c
index 61a910cabf..be89004a2b 100644
--- a/dll/cpl/powercfg/powercfg.c
+++ b/dll/cpl/powercfg/powercfg.c
@@ -26,7 +26,7 @@ TCHAR langSel[255];
/* Applets */
APPLET Applets[NUM_APPLETS] =
{
- {IDC_CPLICON_1, IDS_CPLNAME_1, IDS_CPLDESCRIPTION_1, Applet1}
+ {IDC_CPLICON_1, IDS_CPLNAME_1, IDS_CPLDESCRIPTION_1, Applet1}
};
static BOOL CALLBACK
@@ -72,6 +72,7 @@ PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
{
// NOTE: This callback is needed to set large icon correctly.
HICON hIcon;
+
switch (uMsg)
{
case PSCB_INITIALIZED:
@@ -88,54 +89,54 @@ PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
static LONG APIENTRY
Applet1(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
{
- HPROPSHEETPAGE hpsp[MAX_POWER_PAGES];
- PROPSHEETHEADER psh;
- HPSXA hpsxa = NULL;
- TCHAR Caption[1024];
- SYSTEM_POWER_CAPABILITIES spc;
- LONG ret;
-
- UNREFERENCED_PARAMETER(uMsg);
- UNREFERENCED_PARAMETER(wParam);
- UNREFERENCED_PARAMETER(lParam);
-
- memset(Caption, 0x0, sizeof(Caption));
- LoadString(hApplet, IDS_CPLNAME_1, Caption, sizeof(Caption) / sizeof(TCHAR));
-
- ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
- psh.dwSize = sizeof(PROPSHEETHEADER);
- psh.dwFlags = PSH_PROPTITLE | PSH_USEICONID | PSH_USECALLBACK;
- psh.hwndParent = hwnd;
- psh.hInstance = hApplet;
- psh.pszIcon = MAKEINTRESOURCEW(IDC_CPLICON_1);
- psh.pszCaption = Caption;
- psh.nPages = 0;
- psh.nStartPage = 0;
- psh.phpage = hpsp;
- psh.pfnCallback = PropSheetProc;
-
- InitPropSheetPage(&psh, IDD_PROPPAGEPOWERSCHEMES, PowerSchemesDlgProc);
- if (GetPwrCapabilities(&spc))
- {
- if (spc.SystemBatteriesPresent)
+ HPROPSHEETPAGE hpsp[MAX_POWER_PAGES];
+ PROPSHEETHEADER psh;
+ HPSXA hpsxa = NULL;
+ TCHAR Caption[1024];
+ SYSTEM_POWER_CAPABILITIES spc;
+ LONG ret;
+
+ UNREFERENCED_PARAMETER(uMsg);
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
+
+ memset(Caption, 0x0, sizeof(Caption));
+ LoadString(hApplet, IDS_CPLNAME_1, Caption, sizeof(Caption) / sizeof(TCHAR));
+
+ ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
+ psh.dwSize = sizeof(PROPSHEETHEADER);
+ psh.dwFlags = PSH_PROPTITLE | PSH_USEICONID | PSH_USECALLBACK;
+ psh.hwndParent = hwnd;
+ psh.hInstance = hApplet;
+ psh.pszIcon = MAKEINTRESOURCEW(IDC_CPLICON_1);
+ psh.pszCaption = Caption;
+ psh.nPages = 0;
+ psh.nStartPage = 0;
+ psh.phpage = hpsp;
+ psh.pfnCallback = PropSheetProc;
+
+ InitPropSheetPage(&psh, IDD_PROPPAGEPOWERSCHEMES, PowerSchemesDlgProc);
+ if (GetPwrCapabilities(&spc))
{
- InitPropSheetPage(&psh, IDD_PROPPAGEALARMS, AlarmsDlgProc);
+ if (spc.SystemBatteriesPresent)
+ {
+ InitPropSheetPage(&psh, IDD_PROPPAGEALARMS, AlarmsDlgProc);
+ }
}
- }
- InitPropSheetPage(&psh, IDD_PROPPAGEADVANCED, AdvancedDlgProc);
- InitPropSheetPage(&psh, IDD_PROPPAGEHIBERNATE, HibernateDlgProc);
+ InitPropSheetPage(&psh, IDD_PROPPAGEADVANCED, AdvancedDlgProc);
+ InitPropSheetPage(&psh, IDD_PROPPAGEHIBERNATE, HibernateDlgProc);
- /* Load additional pages provided by shell extensions */
- hpsxa = SHCreatePropSheetExtArray(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER
TEXT("\\Power"), MAX_POWER_PAGES - psh.nPages);
- if (hpsxa != NULL)
- SHAddFromPropSheetExtArray(hpsxa, PropSheetAddPage, (LPARAM)&psh);
+ /* Load additional pages provided by shell extensions */
+ hpsxa = SHCreatePropSheetExtArray(HKEY_LOCAL_MACHINE, REGSTR_PATH_CONTROLSFOLDER
TEXT("\\Power"), MAX_POWER_PAGES - psh.nPages);
+ if (hpsxa != NULL)
+ SHAddFromPropSheetExtArray(hpsxa, PropSheetAddPage, (LPARAM)&psh);
- ret = (LONG)(PropertySheet(&psh) != -1);
+ ret = (LONG)(PropertySheet(&psh) != -1);
- if (hpsxa != NULL)
- SHDestroyPropSheetExtArray(hpsxa);
+ if (hpsxa != NULL)
+ SHDestroyPropSheetExtArray(hpsxa);
- return ret;
+ return ret;
}
/* Control Panel Callback */
@@ -145,34 +146,38 @@ CPlApplet(HWND hwndCPl,
LPARAM lParam1,
LPARAM lParam2)
{
- int i = (int)lParam1;
+ int i = (int)lParam1;
- switch(uMsg)
- {
- case CPL_INIT:
- {
- return TRUE;
- }
- case CPL_GETCOUNT:
- {
- return NUM_APPLETS;
- }
- case CPL_INQUIRE:
- {
- CPLINFO *CPlInfo = (CPLINFO*)lParam2;
- CPlInfo->lData = 0;
- CPlInfo->idIcon = Applets[i].idIcon;
- CPlInfo->idName = Applets[i].idName;
- CPlInfo->idInfo = Applets[i].idDescription;
- break;
- }
- case CPL_DBLCLK:
+ switch (uMsg)
{
- Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
- break;
+ case CPL_INIT:
+ {
+ return TRUE;
+ }
+
+ case CPL_GETCOUNT:
+ {
+ return NUM_APPLETS;
+ }
+
+ case CPL_INQUIRE:
+ {
+ CPLINFO *CPlInfo = (CPLINFO*)lParam2;
+ CPlInfo->lData = 0;
+ CPlInfo->idIcon = Applets[i].idIcon;
+ CPlInfo->idName = Applets[i].idName;
+ CPlInfo->idInfo = Applets[i].idDescription;
+ break;
+ }
+
+ case CPL_DBLCLK:
+ {
+ Applets[i].AppletProc(hwndCPl, uMsg, lParam1, lParam2);
+ break;
+ }
}
- }
- return FALSE;
+
+ return FALSE;
}
@@ -181,13 +186,15 @@ DllMain(HINSTANCE hinstDLL,
DWORD dwReason,
LPVOID lpvReserved)
{
- UNREFERENCED_PARAMETER(lpvReserved);
- switch(dwReason)
- {
- case DLL_PROCESS_ATTACH:
- case DLL_THREAD_ATTACH:
- hApplet = hinstDLL;
- break;
- }
- return TRUE;
+ UNREFERENCED_PARAMETER(lpvReserved);
+
+ switch(dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ case DLL_THREAD_ATTACH:
+ hApplet = hinstDLL;
+ break;
+ }
+
+ return TRUE;
}