From 3f1628f127d35aa14da97e50c2a94cfd61ad52dd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 11 May 2018 21:22:17 +0200 Subject: merge from master to fixes #1349 (Miranda crashes on coming back from auto away) --- plugins/Scriver/src/chat_window.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'plugins/Scriver/src/chat_window.cpp') diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index 7331033f84..ad31b1805e 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -533,16 +533,11 @@ void CChatRoomDlg::UpdateStatusBar() void CChatRoomDlg::UpdateTitle() { + MODULEINFO *mi = pci->MM_FindModule(m_si->pszModule); + TitleBarData tbd = {}; - if (g_dat.flags & SMF_STATUSICON) { - MODULEINFO *mi = pci->MM_FindModule(m_si->pszModule); - tbd.hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIcon : mi->hOfflineIcon; - tbd.hIconBig = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIconBig : mi->hOfflineIconBig; - } - else { - tbd.hIcon = GetCachedIcon("chat_window"); - tbd.hIconBig = g_dat.hIconChatBig; - } + tbd.hIcon = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIcon : mi->hOfflineIcon; + tbd.hIconBig = (m_si->wStatus == ID_STATUS_ONLINE) ? mi->hOnlineIconBig : mi->hOfflineIconBig; tbd.hIconNot = (m_si->wState & (GC_EVENT_HIGHLIGHT | STATE_TALK)) ? GetCachedIcon("chat_overlay") : nullptr; wchar_t szTemp[512]; @@ -564,6 +559,7 @@ void CChatRoomDlg::UpdateTitle() tbd.iFlags = TBDF_TEXT | TBDF_ICON; tbd.pszText = szTemp; SendMessage(m_hwndParent, CM_UPDATETITLEBAR, (WPARAM)&tbd, (LPARAM)m_hwnd); + SendMessage(m_hwnd, DM_UPDATETABCONTROL, 0, 0); } -- cgit v1.2.3