[PATCH 3/3] wineconsole: Add Insert Mode checkbox to the Options dialog

Hugh McMaster hugh.mcmaster at outlook.com
Mon May 11 04:01:29 CDT 2015


This patch adds a checkbox for Insert Mode to the user backend Options dialog.

This is the final patch to modify resource strings in this series.
---
 programs/wineconsole/dialog.c          | 5 +++++
 programs/wineconsole/wineconsole.c     | 1 +
 programs/wineconsole/wineconsole.rc    | 1 +
 programs/wineconsole/wineconsole_res.h | 1 +
 4 files changed, 8 insertions(+)

diff --git a/programs/wineconsole/dialog.c b/programs/wineconsole/dialog.c
index 8573d07..493990d 100644
--- a/programs/wineconsole/dialog.c
+++ b/programs/wineconsole/dialog.c
@@ -76,6 +76,8 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
 	SetDlgItemInt(hDlg, IDC_OPT_HIST_SIZE, di->config.history_size,  FALSE);
         SendDlgItemMessageW(hDlg, IDC_OPT_HIST_NODOUBLE, BM_SETCHECK,
                             (di->config.history_nodup) ? BST_CHECKED : BST_UNCHECKED, 0);
+        SendDlgItemMessageW(hDlg, IDC_OPT_INSERT_MODE, BM_SETCHECK,
+                            (di->config.insert_mode) ? BST_CHECKED : BST_UNCHECKED, 0);
         SendDlgItemMessageW(hDlg, IDC_OPT_CONF_CTRL, BM_SETCHECK,
                             (di->config.menu_mask & MK_CONTROL) ? BST_CHECKED : BST_UNCHECKED, 0);
         SendDlgItemMessageW(hDlg, IDC_OPT_CONF_SHIFT, BM_SETCHECK,
@@ -121,6 +123,9 @@ static INT_PTR WINAPI WCUSER_OptionDlgProc(HWND hDlg, UINT msg, WPARAM wParam, L
             val = (IsDlgButtonChecked(hDlg, IDC_OPT_HIST_NODOUBLE) & BST_CHECKED) != 0;
             di->config.history_nodup = val;
 
+            val = (IsDlgButtonChecked(hDlg, IDC_OPT_INSERT_MODE) & BST_CHECKED) != 0;
+            di->config.insert_mode = val;
+
             val = 0;
             if (IsDlgButtonChecked(hDlg, IDC_OPT_CONF_CTRL) & BST_CHECKED)  val |= MK_CONTROL;
             if (IsDlgButtonChecked(hDlg, IDC_OPT_CONF_SHIFT) & BST_CHECKED) val |= MK_SHIFT;
diff --git a/programs/wineconsole/wineconsole.c b/programs/wineconsole/wineconsole.c
index ed5f816..cc33807 100644
--- a/programs/wineconsole/wineconsole.c
+++ b/programs/wineconsole/wineconsole.c
@@ -397,6 +397,7 @@ void     WINECON_SetConfig(struct inner_data* data, const struct config_data* cf
         data->curcfg.history_nodup = cfg->history_nodup;
         WINECON_SetHistoryMode(data->hConIn, cfg->history_nodup);
     }
+    data->curcfg.insert_mode = cfg->insert_mode;
     data->curcfg.menu_mask = cfg->menu_mask;
     data->curcfg.quick_edit = cfg->quick_edit;
     if (1 /* FIXME: font info has changed */)
diff --git a/programs/wineconsole/wineconsole.rc b/programs/wineconsole/wineconsole.rc
index e0f5983..d0f2e63 100644
--- a/programs/wineconsole/wineconsole.rc
+++ b/programs/wineconsole/wineconsole.rc
@@ -66,6 +66,7 @@ FONT 8, "MS Shell Dlg"
 
 	GROUPBOX "Console", -1, 70, 5, 70, 52, BS_GROUPBOX
 	AUTOCHECKBOX "&Quick Edit", IDC_OPT_QUICK_EDIT, 74, 18, 60, 10, WS_TABSTOP
+	AUTOCHECKBOX "&Insert Mode", IDC_OPT_INSERT_MODE, 74, 30, 60, 10, WS_TABSTOP
 
 	GROUPBOX "Popup Menu", -1, 145, 5, 60, 52, BS_GROUPBOX
 	AUTOCHECKBOX "&Control", IDC_OPT_CONF_CTRL, 149, 18, 50, 10, WS_TABSTOP
diff --git a/programs/wineconsole/wineconsole_res.h b/programs/wineconsole/wineconsole_res.h
index ac62b58..8261fd5 100644
--- a/programs/wineconsole/wineconsole_res.h
+++ b/programs/wineconsole/wineconsole_res.h
@@ -70,6 +70,7 @@
 #define IDC_OPT_CONF_CTRL       0x0107
 #define IDC_OPT_CONF_SHIFT      0x0108
 #define IDC_OPT_QUICK_EDIT      0x0109
+#define IDC_OPT_INSERT_MODE     0x0110
 
 #define IDC_FNT_LIST_FONT	0x0201
 #define IDC_FNT_LIST_SIZE	0x0202
-- 
1.9.1




More information about the wine-patches mailing list