- Fix formatting
authorDmitry Chapyshev <dmitry@reactos.org>
Sun, 20 Apr 2008 07:57:28 +0000 (07:57 +0000)
committerDmitry Chapyshev <dmitry@reactos.org>
Sun, 20 Apr 2008 07:57:28 +0000 (07:57 +0000)
svn path=/trunk/; revision=33049

reactos/dll/cpl/input/add.c
reactos/dll/cpl/input/settings.c

index c59895c..4f80bcd 100644 (file)
@@ -39,34 +39,34 @@ SelectLayoutByLang(VOID)
 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
index c14a2d2..888d4a3 100644 (file)
@@ -167,20 +167,20 @@ InitLangList(HWND hWnd)
 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;
+    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);
-       }
+    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 @@ SettingPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
     {
         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 @@ SettingPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
         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,