summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-11 19:52:52 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-11 19:52:52 +0300
commit02bb82c1c0a4031e7b2f5578370fa5acd620f8e1 (patch)
treec18da4f063f47fc89cd2d57a5184bb15b7a135fb /plugins/TabSRMM
parent120b68869dab681e9c2360cd2b3905ee3a7ecf4a (diff)
fixes #4653 (Плагины сообщений: невозможно удалить имя группы чатов)
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/res/chat.rc2
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp12
-rw-r--r--plugins/TabSRMM/src/resource.h1
3 files changed, 13 insertions, 2 deletions
diff --git a/plugins/TabSRMM/res/chat.rc b/plugins/TabSRMM/res/chat.rc
index 9d9e96f991..cae7e4d74b 100644
--- a/plugins/TabSRMM/res/chat.rc
+++ b/plugins/TabSRMM/res/chat.rc
@@ -92,7 +92,7 @@ BEGIN
CONTROL "",IDC_CHECKBOXES,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_FULLROWSELECT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,6,9,289,177
LTEXT "Text for autocomplete:",IDC_STATIC,10,210,177,10
EDITTEXT IDC_GROUP,191,192,102,14,ES_AUTOHSCROLL
- LTEXT "Add new rooms to group:",IDC_STATIC,10,193,179,10
+ CONTROL "Add new rooms to group:",IDC_CHAT_USEGROUP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,193,179,10
EDITTEXT IDC_AUTOCOMPLETE,191,208,102,14,ES_AUTOHSCROLL
END
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index bc19086e3e..df55931612 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -488,14 +488,19 @@ class CChatSettingsDlg : public CChatBaseOptionDlg
CCtrlTreeOpts treeCheck;
CCtrlEdit edtGroup, edtAutocomplete;
+ CCtrlCheck chkUseGroup;
public:
CChatSettingsDlg() :
CChatBaseOptionDlg(IDD_OPTIONS1),
+ chkUseGroup(this, IDC_CHAT_USEGROUP),
edtGroup(this, IDC_GROUP),
edtAutocomplete(this, IDC_AUTOCOMPLETE),
treeCheck(this, IDC_CHECKBOXES)
{
+ CreateLink(chkUseGroup, Chat::bUseGroup);
+ chkUseGroup.OnChange = Callback(this, &CChatSettingsDlg::onChange_UseGroup);
+
auto *pwszSection = LPGENW("Appearance and functionality of chat room windows");
treeCheck.AddOption(pwszSection, LPGENW("Open new chat rooms in the default container"), g_plugin.bOpenInDefault);
treeCheck.AddOption(pwszSection, LPGENW("Flash window when someone speaks"), Chat::bFlashWindow);
@@ -534,7 +539,7 @@ public:
if (mir_wstrlen(g_Settings.pwszAutoText))
edtAutocomplete.SetText(g_Settings.pwszAutoText);
- edtGroup.SetText(ptrW(Chat_GetGroup()));
+ edtGroup.SetText(Chat_GetGroup());
return true;
}
@@ -555,6 +560,11 @@ public:
b = treeCheck.GetItemState(hListHeading2, TVIS_EXPANDED) & TVIS_EXPANDED ? 1 : 0;
db_set_b(0, CHAT_MODULE, "Branch2Exp", b);
}
+
+ void onChange_UseGroup(CCtrlCheck *)
+ {
+ edtGroup.Enable(chkUseGroup.IsChecked());
+ }
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/TabSRMM/src/resource.h b/plugins/TabSRMM/src/resource.h
index 6482a1bb08..b9eb8f84a4 100644
--- a/plugins/TabSRMM/src/resource.h
+++ b/plugins/TabSRMM/src/resource.h
@@ -101,6 +101,7 @@
#define IDC_LOGLIMIT 1024
#define IDC_CLOSE 1025
#define IDC_CHKACTR_DISMISS 1026
+#define IDC_CHAT_USEGROUP 1027
#define IDC_CHKACTR_OPEN 1028
#define IDC_CONTACTPIC 1029
#define IDC_CHAT_SPIN2 1029