Author: dchapyshev
Date: Sun Apr 20 02:57:28 2008
New Revision: 33049
URL:
http://svn.reactos.org/svn/reactos?rev=33049&view=rev
Log:
- Fix formatting
Modified:
trunk/reactos/dll/cpl/input/add.c
trunk/reactos/dll/cpl/input/settings.c
Modified: trunk/reactos/dll/cpl/input/add.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/add.c?rev=33…
==============================================================================
--- trunk/reactos/dll/cpl/input/add.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/add.c [iso-8859-1] Sun Apr 20 02:57:28 2008
@@ -39,34 +39,34 @@
static VOID
AddNewLayout(HWND hwndDlg)
{
- TCHAR NewLayout[3];
- INT iLayout;
- HKEY hKey;
- DWORD cValues;
- PTSTR pts;
-
- iLayout = SendMessage(hLayoutList, CB_GETCURSEL, 0, 0);
- if (iLayout == CB_ERR) return;
-
- if (RegOpenKey(HKEY_CURRENT_USER, _T("Keyboard Layout\\Preload"), &hKey)
== ERROR_SUCCESS)
- {
- if (RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &cValues, NULL, NULL,
NULL, NULL) == ERROR_SUCCESS)
- {
- _stprintf(NewLayout, _T("%d"), cValues + 1);
-
- pts = (PTSTR) SendMessage(hLayoutList, CB_GETITEMDATA, iLayout, 0);
-
- if (RegSetValueEx(hKey,
- NewLayout,
- 0,
- REG_SZ,
- (LPBYTE)pts,
- (DWORD)(_tcslen(pts)*sizeof(PTSTR))) == ERROR_SUCCESS)
- {
- UpdateLayoutsList();
- }
- }
- }
+ TCHAR NewLayout[3];
+ INT iLayout;
+ HKEY hKey;
+ DWORD cValues;
+ PTSTR pts;
+
+ iLayout = SendMessage(hLayoutList, CB_GETCURSEL, 0, 0);
+ if (iLayout == CB_ERR) return;
+
+ if (RegOpenKey(HKEY_CURRENT_USER, _T("Keyboard Layout\\Preload"),
&hKey) == ERROR_SUCCESS)
+ {
+ if (RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &cValues, NULL,
NULL, NULL, NULL) == ERROR_SUCCESS)
+ {
+ _stprintf(NewLayout, _T("%d"), cValues + 1);
+
+ pts = (PTSTR) SendMessage(hLayoutList, CB_GETITEMDATA, iLayout, 0);
+
+ if (RegSetValueEx(hKey,
+ NewLayout,
+ 0,
+ REG_SZ,
+ (LPBYTE)pts,
+ (DWORD)(_tcslen(pts)*sizeof(PTSTR))) == ERROR_SUCCESS)
+ {
+ UpdateLayoutsList();
+ }
+ }
+ }
}
VOID
Modified: trunk/reactos/dll/cpl/input/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/settings.c?r…
==============================================================================
--- trunk/reactos/dll/cpl/input/settings.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/input/settings.c [iso-8859-1] Sun Apr 20 02:57:28 2008
@@ -167,20 +167,20 @@
VOID
UpdateLayoutsList(VOID)
{
- (VOID) ListView_DeleteAllItems(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST));
- InitLangList(MainDlgWnd);
+ (VOID) ListView_DeleteAllItems(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST));
+ InitLangList(MainDlgWnd);
}
static VOID
DeleteLayout(VOID)
{
- INT iIndex;
-
- iIndex = (INT) SendMessage(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST), LVM_GETNEXTITEM,
-1, LVNI_FOCUSED);
- if (iIndex != -1)
- {
- MessageBox(0, _T("Not implemented!"), NULL, MB_OK);
- }
+ INT iIndex;
+
+ iIndex = (INT) SendMessage(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST),
LVM_GETNEXTITEM, -1, LVNI_FOCUSED);
+ if (iIndex != -1)
+ {
+ MessageBox(0, _T("Not implemented!"), NULL, MB_OK);
+ }
}
/* Property page dialog callback */
@@ -193,10 +193,10 @@
{
case WM_INITDIALOG:
{
- MainDlgWnd = hwndDlg;
- AddListColumn(hwndDlg);
- (VOID) ListView_SetExtendedListViewStyle(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST),
- LVS_EX_FULLROWSELECT);
+ MainDlgWnd = hwndDlg;
+ AddListColumn(hwndDlg);
+ (VOID) ListView_SetExtendedListViewStyle(GetDlgItem(MainDlgWnd,
IDC_KEYLAYOUT_LIST),
+ LVS_EX_FULLROWSELECT);
InitLangList(hwndDlg);
EnableWindow(GetDlgItem(hwndDlg, IDC_PROP_BUTTON),FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_SET_DEFAULT),FALSE);
@@ -213,9 +213,9 @@
case WM_COMMAND:
switch (LOWORD(wParam))
{
- case IDC_REMOVE_BUTTON:
- DeleteLayout();
- break;
+ case IDC_REMOVE_BUTTON:
+ DeleteLayout();
+ break;
case IDC_KEY_SET_BTN:
DialogBox(hApplet,