diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-08 20:01:12 +0200 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-08 20:01:27 +0200 |
commit | 05af149ef6d5b35e7c7a074f37e59462b3dc2d56 (patch) | |
tree | 6951e784eebd9b1a96ef715364a055ea5074daa8 /src | |
parent | e6d1be3fc07ec136c516c93b6e799e7942287711 (diff) |
fixes #1329 (StdMsg: bug with "Use the contact's status icon as the window icon")
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 10 |
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:
|