diff options
author | George Hazan <ghazan@miranda.im> | 2020-06-11 22:20:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-06-11 22:20:18 +0300 |
commit | 5fb805622a3a3368ffb3de0c649074376e70256a (patch) | |
tree | 64f0149c8e5d692cf19e5fcebb60b0fba59e3d93 /protocols/JabberG/src/jabber_opt.cpp | |
parent | e6bf9c2a41622424c2cd4006326455e08c80812a (diff) |
fixes #1149 (XMPP/Jabber: Implement XEP-0313 ( mam / Message Archive Management )
Diffstat (limited to 'protocols/JabberG/src/jabber_opt.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_opt.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 7ee006d64b..65d95086e9 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -348,7 +348,7 @@ class CDlgOptAccount : public CJabberDlgBase CCtrlEdit m_txtManualPort;
CCtrlCheck m_chkKeepAlive;
CCtrlCheck m_chkAutoDeleteContacts;
- CCtrlCombo m_cbLocale;
+ CCtrlCombo m_cbLocale, m_cbMam;
CCtrlButton m_btnRegister;
CCtrlButton m_btnUnregister;
CCtrlButton m_btnChangePassword;
@@ -364,6 +364,7 @@ public: m_cbResource(this, IDC_COMBO_RESOURCE),
m_chkUseHostnameAsResource(this, IDC_HOSTNAME_AS_RESOURCE),
m_chkUseDomainLogin(this, IDC_USEDOMAINLOGIN),
+ m_cbMam(this, IDC_MAM_MODE),
m_cbServer(this, IDC_EDIT_LOGIN_SERVER),
m_txtPort(this, IDC_PORT),
m_chkUseSsl(this, IDC_USE_SSL),
@@ -429,6 +430,14 @@ protected: for (auto &it : szResources)
m_cbResource.AddString(it);
+
+ // fill MAM modes
+ wchar_t *szMamModes[] = { LPGENW("Never"), LPGENW("Roster"), LPGENW("Always") };
+ for (auto &it : szMamModes)
+ m_cbMam.AddString(it, int(&it - szMamModes));
+ m_cbMam.SetCurSel(m_proto->m_iMamMode);
+ m_cbMam.Enable(m_proto->m_ThreadInfo && (m_proto->m_ThreadInfo->jabberServerCaps & JABBER_CAPS_MAM));
+
// append computer name to the resource list
wchar_t szCompName[MAX_COMPUTERNAME_LENGTH + 1];
DWORD dwCompNameLength = MAX_COMPUTERNAME_LENGTH;
@@ -488,6 +497,9 @@ protected: }
}
+ if (m_cbMam.Enabled() && m_cbMam.GetCurSel() != m_proto->m_iMamMode)
+ m_proto->MamSetMode(m_cbMam.GetCurSel());
+
sttStoreJidFromUI(m_proto, m_txtUsername, m_cbServer);
if (m_proto->m_bJabberOnline) {
|