summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 2456c527bf..59f3cdb76f 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -634,11 +634,12 @@ void CSrmmWindow::UpdateTitle()
m_wStatus = db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
wchar_t *contactName = Clist_GetContactDisplayName(m_hContact);
- wchar_t *szStatus = Clist_GetStatusModeDescription(m_szProto == nullptr ? ID_STATUS_OFFLINE : db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE), 0);
if (g_dat.bUseStatusWinIcon)
mir_snwprintf(newtitle, L"%s - %s", contactName, TranslateT("Message session"));
- else
+ else {
+ wchar_t *szStatus = Clist_GetStatusModeDescription(m_szProto == nullptr ? ID_STATUS_OFFLINE : db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE), 0);
mir_snwprintf(newtitle, L"%s (%s): %s", contactName, szStatus, TranslateT("Message session"));
+ }
m_wOldStatus = m_wStatus;
}
@@ -1035,8 +1036,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
Window_FreeIcon_IcoLib(m_pOwner->GetHwnd());
if (m_szProto) {
- WORD wStatus = db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
- Window_SetProtoIcon_IcoLib(m_pOwner->GetHwnd(), m_szProto, wStatus);
+ Window_SetProtoIcon_IcoLib(m_pOwner->GetHwnd(), m_szProto, Contact_GetStatus(m_hContact));
break;
}
}
@@ -1091,6 +1091,8 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
UpdateLastMessage();
if (KillTimer(m_hwnd, TIMERID_FLASHWND))
FlashWindow(m_pOwner->GetHwnd(), FALSE);
+ if (g_dat.bUseStatusWinIcon)
+ SendMessage(m_hwnd, DM_UPDATEWINICON, 0, 0);
break;
case WM_CBD_LOADICONS: