diff options
author | George Hazan <ghazan@miranda.im> | 2020-03-31 19:53:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-03-31 19:53:16 +0300 |
commit | cfd6a373fb30755b26fb4d461c3f471403c70c7f (patch) | |
tree | d65122c4508faa1877b1197b6c3ed7e86d9375c3 | |
parent | 226427505784cb0db153e44baa45d1b7d028aff9 (diff) |
fixes #2262 (StdMsg: баг при добавлении контакта)
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 4f04cdca16..c1bc480784 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -1681,6 +1681,28 @@ void CMsgDialog::UpdateTitle() if (mir_wstrcmp(newtitle, oldtitle)) //swt() flickers even if the title hasn't actually changed
SetWindowText(m_pOwner->GetHwnd(), newtitle);
}
+
+ if (!isChat()) {
+ int idx = m_pOwner->m_tab.GetDlgIndex(this);
+ if (idx == -1)
+ return;
+
+ auto *pwszName = Clist_GetContactDisplayName(m_hContact);
+ wchar_t oldtitle[256];
+
+ TCITEM ti;
+ ti.mask = TCIF_TEXT;
+ ti.pszText = oldtitle;
+ ti.cchTextMax = _countof(oldtitle);
+ TabCtrl_GetItem(m_pOwner->m_tab.GetHwnd(), idx, &ti);
+
+ // change text only if it was changed
+ if (mir_wstrcmp(pwszName, oldtitle)) {
+ ti.pszText = pwszName;
+ ti.cchTextMax = 0;
+ TabCtrl_SetItem(m_pOwner->m_tab.GetHwnd(), idx, &ti);
+ }
+ }
}
void CMsgDialog::UserTyping(int nSecs)
|