summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
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/src
parent120b68869dab681e9c2360cd2b3905ee3a7ecf4a (diff)
fixes #4653 (Плагины сообщений: невозможно удалить имя группы чатов)
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp12
-rw-r--r--plugins/TabSRMM/src/resource.h1
2 files changed, 12 insertions, 1 deletions
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