summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-10 22:02:52 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-10 22:02:52 +0300
commit210acddc8bc8d48c7a3d71c09db0eed3f5a9c2b0 (patch)
tree2a1041f133ed8884f7f979ea085482f245bd85fc /src
parenta5f518e4cbfd3b47c62d2ef5b524ae1252af9e35 (diff)
fixes #2438 (Jabber: списки приватности странно себя ведут) + some another DoModal() calls cleaning
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/src/db_ini.cpp16
-rw-r--r--src/mir_app/src/proto_opts.cpp2
2 files changed, 10 insertions, 8 deletions
diff --git a/src/mir_app/src/db_ini.cpp b/src/mir_app/src/db_ini.cpp
index 31d65c2627..2580d8eb3d 100644
--- a/src/mir_app/src/db_ini.cpp
+++ b/src/mir_app/src/db_ini.cpp
@@ -46,16 +46,17 @@ protected:
m_iniName.SetText(m_szIniPath);
wchar_t szSecurity[11];
- const wchar_t *pszSecurityInfo;
-
Profile_GetSetting(L"AutoExec/Warn", szSecurity, L"notsafe");
+
+ const wchar_t *pszSecurityInfo;
if (!mir_wstrcmpi(szSecurity, L"all"))
pszSecurityInfo = LPGENW("Security systems to prevent malicious changes are in place and you will be warned before every change that is made.");
else if (!mir_wstrcmpi(szSecurity, L"onlyunsafe"))
pszSecurityInfo = LPGENW("Security systems to prevent malicious changes are in place and you will be warned before changes that are known to be unsafe.");
else if (!mir_wstrcmpi(szSecurity, L"none"))
pszSecurityInfo = LPGENW("Security systems to prevent malicious changes have been disabled. You will receive no further warnings.");
- else pszSecurityInfo = nullptr;
+ else
+ pszSecurityInfo = nullptr;
if (pszSecurityInfo)
m_securityInfo.SetText(TranslateW(pszSecurityInfo));
@@ -70,7 +71,7 @@ protected:
void NoToAll_OnClick(CCtrlBase*)
{
- Close();
+ EndModal(IDC_NOTOALL);
}
public:
@@ -135,13 +136,14 @@ protected:
bool OnInitDialog() override
{
char szSettingName[256];
- const wchar_t *pszSecurityInfo;
m_iniName.SetText(m_warnInfo->szIniPath);
mir_strcpy(szSettingName, m_warnInfo->szSection);
mir_strcat(szSettingName, " / ");
mir_strcat(szSettingName, m_warnInfo->szName);
m_settingName.SetTextA(szSettingName);
m_newValue.SetTextA(m_warnInfo->szValue);
+
+ const wchar_t *pszSecurityInfo;
if (IsInSpaceSeparatedList(m_warnInfo->szSection, m_warnInfo->szSafeSections))
pszSecurityInfo = LPGENW("This change is known to be safe.");
else if (IsInSpaceSeparatedList(m_warnInfo->szSection, m_warnInfo->szUnsafeSections))
@@ -158,9 +160,9 @@ protected:
m_warnInfo->warnNoMore = m_noWarn.GetState();
}
- void YesNo_OnClick(CCtrlBase*)
+ void YesNo_OnClick(CCtrlBase *pButton)
{
- Close();
+ EndModal(pButton->GetCtrlId());
}
public:
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index ba09d8cf6f..1f5913d960 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -489,7 +489,7 @@ public:
void OnAdd(CCtrlButton*)
{
- if (IDOK == CAccountFormDlg(this, PRAC_ADDED, nullptr).DoModal()) {
+ if (CAccountFormDlg(this, PRAC_ADDED, nullptr).DoModal()) {
m_iPrevSel = -1;
Refresh();
}