[CONSRV]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 1 Apr 2013 17:26:53 +0000 (17:26 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 1 Apr 2013 17:26:53 +0000 (17:26 +0000)
Allow passing into quick-edit and insert mode via the console properties dialog. Also make the context menu working.

svn path=/branches/ros-csrss/; revision=58634

dll/cpl/console/options.c
win32ss/user/consrv/frontends/gui/guiterm.c
win32ss/user/consrv/settings.c

index c208959..9ba28cf 100644 (file)
@@ -105,48 +105,48 @@ OptionsProc(HWND hwndDlg,
                 }
                 case IDC_CHECK_QUICK_EDIT:
                 {
-                    lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0, (LPARAM)0);
+                    lResult = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
                     if (lResult == BST_CHECKED)
                     {
                         pConInfo->ci.QuickEdit = FALSE;
-                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, (LPARAM)0);
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
                     }
                     else if (lResult == BST_UNCHECKED)
                     {
                         pConInfo->ci.QuickEdit = TRUE;
-                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
                     }
                     PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
                 }
                 case IDC_CHECK_INSERT_MODE:
                 {
-                    lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0, (LPARAM)0);
+                    lResult = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
                     if (lResult == BST_CHECKED)
                     {
                         pConInfo->ci.InsertMode = FALSE;
-                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, (LPARAM)0);
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
                     }
                     else if (lResult == BST_UNCHECKED)
                     {
                         pConInfo->ci.InsertMode = TRUE;
-                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
                     }
                     PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
                 }
                 case IDC_CHECK_DISCARD_DUPLICATES:
                 {
-                   lResult = SendMessage((HWND)lParam, BM_GETCHECK, (WPARAM)0, (LPARAM)0);
+                   lResult = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0);
                     if (lResult == BST_CHECKED)
                     {
                         pConInfo->ci.HistoryNoDup = FALSE;
-                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, (LPARAM)0);
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
                     }
                     else if (lResult == BST_UNCHECKED)
                     {
                         pConInfo->ci.HistoryNoDup = TRUE;
-                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0);
+                        SendMessage((HWND)lParam, BM_SETCHECK, (WPARAM)BST_CHECKED, 0);
                     }
                     PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
                     break;
index 74e2520..9d2ae4d 100644 (file)
@@ -1529,6 +1529,7 @@ GuiConsoleWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
             }
         }
 
+        case WM_COMMAND:
         case WM_SYSCOMMAND:
         {
             Result = GuiConsoleHandleSysMenuCommand(GuiData, wParam, lParam);
index 4b1d95a..3fcf396 100644 (file)
@@ -450,6 +450,23 @@ ConSrvApplyUserSettings(IN PCONSOLE Console,
     COORD BufSize;
     BOOL SizeChanged = FALSE;
 
+    /*
+     * Apply full-screen mode.
+     */
+    if (ConsoleInfo->FullScreen)
+        Console->ActiveBuffer->DisplayMode |= CONSOLE_FULLSCREEN_MODE;
+    else
+        Console->ActiveBuffer->DisplayMode &= ~CONSOLE_FULLSCREEN_MODE;
+    // TODO: Apply it really
+
+    /*
+     * Apply terminal-edition settings:
+     * - QuickEdit and Insert modes,
+     * - history settings.
+     */
+    Console->QuickEdit  = ConsoleInfo->QuickEdit;
+    Console->InsertMode = ConsoleInfo->InsertMode;
+
     /*
      * Apply foreground and background colors for both screen and popup
      * and copy the new palette.