diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-06 20:56:51 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-06 20:56:51 +0300 |
commit | 56fdabecb8a871532a30e6e403d5108e80586bf0 (patch) | |
tree | 0d6bc3994ec6bd627a248a3490c99fa58be7b5e3 /plugins/TabSRMM | |
parent | cdab8da6a715e0814acb7778f51d272f573b92e3 (diff) |
fixes #1826 (TabSRMM: if a contact was added from clist, appropriate controls in tabSRMM window remains active)
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 05f1f8dc86..32e130295d 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -391,10 +391,16 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) CTabBaseDlg *dat = c->getDat();
if (!strcmp(setting, "MirVer"))
PostMessage(hwnd, DM_CLIENTCHANGED, 0, 0);
+
+ if (dat && !strcmp(setting, "NotOnList") && (cws->value.type == DBVT_DELETED || cws->value.bVal == 0))
+ ((CSrmmWindow*)dat)->onClick_CancelAdd(0);
+
if (dat && (fChanged || fExtendedStatusChange))
dat->UpdateTitle();
+
if (fExtendedStatusChange)
PostMessage(hwnd, DM_UPDATESTATUSMSG, 0, 0);
+
if (fChanged) {
if (dat && c->getStatus() == ID_STATUS_OFFLINE) { // clear typing notification in the status bar when contact goes offline
dat->m_nTypeSecs = 0;
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index bc7451bfbb..625dbe7f8a 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1159,7 +1159,7 @@ void CSrmmWindow::onClick_Add(CCtrlButton*) Contact_Add(m_hContact, m_hwnd);
if (!db_get_b(m_hContact, "CList", "NotOnList", 0)) {
- m_bNotOnList = FALSE;
+ m_bNotOnList = false;
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
if (!(m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
@@ -1257,7 +1257,7 @@ void CSrmmWindow::onClick_Quote(CCtrlButton*) void CSrmmWindow::onClick_CancelAdd(CCtrlButton*)
{
- m_bNotOnList = FALSE;
+ m_bNotOnList = false;
ShowMultipleControls(m_hwnd, addControls, _countof(addControls), SW_HIDE);
if (!(m_dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
Utils::showDlgControl(m_hwnd, IDC_LOGFROZENTEXT, SW_HIDE);
|