diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-07 22:09:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-07 22:09:56 +0300 |
commit | 910c56f864415317b7863e64af47fe28af21fe4f (patch) | |
tree | 2f07f12e06d3c107b6dec33180eee29b13121666 | |
parent | 8e52da65d2cfa36bf23fa7be0577e420f3cf0480 (diff) |
Discord: fix for wiping options in short account form
-rw-r--r-- | protocols/Discord/src/options.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/Discord/src/options.cpp b/protocols/Discord/src/options.cpp index 1042d80dcb..aecccdddfd 100644 --- a/protocols/Discord/src/options.cpp +++ b/protocols/Discord/src/options.cpp @@ -26,7 +26,7 @@ class CDiscardAccountOptions : public CProtoDlgBase<CDiscordProto> ptrW m_wszOldGroup; public: - CDiscardAccountOptions(CDiscordProto *ppro, int iDlgID) : + CDiscardAccountOptions(CDiscordProto *ppro, int iDlgID, bool bFullDlg) : CProtoDlgBase<CDiscordProto>(ppro, iDlgID), m_edGroup(this, IDC_GROUP), m_edUserName(this, IDC_USERNAME), @@ -37,8 +37,10 @@ public: { CreateLink(m_edGroup, ppro->m_wszDefaultGroup); CreateLink(m_edUserName, ppro->m_wszEmail); - CreateLink(chkHideChats, ppro->m_bHideGroupchats); - CreateLink(chkUseGroups, ppro->m_bUseGuildGroups); + if (bFullDlg) { + CreateLink(chkHideChats, ppro->m_bHideGroupchats); + CreateLink(chkUseGroups, ppro->m_bUseGuildGroups); + } } bool OnInitDialog() override @@ -64,7 +66,7 @@ public: INT_PTR CDiscordProto::SvcCreateAccMgrUI(WPARAM, LPARAM hwndParent) { - CDiscardAccountOptions *pDlg = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCMGR); + CDiscardAccountOptions *pDlg = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCMGR, false); pDlg->SetParent((HWND)hwndParent); pDlg->Create(); return (INT_PTR)pDlg->GetHwnd(); @@ -79,7 +81,7 @@ int CDiscordProto::OnOptionsInit(WPARAM wParam, LPARAM) odp.position = 1; odp.szTab.w = LPGENW("Account"); - odp.pDialog = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCOUNT); + odp.pDialog = new CDiscardAccountOptions(this, IDD_OPTIONS_ACCOUNT, true); g_plugin.addOptions(wParam, &odp); return 0; } |