diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-19 16:42:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-19 16:42:30 +0300 |
commit | 15051a110d2575c2baa9a3b358977000c876abd9 (patch) | |
tree | e2da12f45d6397827b44e63828b94112fca04086 /src/core | |
parent | bc6680e6111154c7afc1fd602fdfe456b5a5bbe0 (diff) |
fixes #1371 (StdMsg: statusbar in conference show time instead topic)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 19 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 4750710aaf..d98eaac7ea 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -548,19 +548,22 @@ void CSrmmWindow::ShowAvatar() SendMessage(m_hwnd, DM_AVATARSIZECHANGE, 0, 0);
}
-void CSrmmWindow::ShowTime()
+void CSrmmWindow::ShowTime(bool bForce)
{
- if (m_hTimeZone) {
- SYSTEMTIME st;
- GetSystemTime(&st);
- if (m_wMinute != st.wMinute) {
+ if (!m_hTimeZone)
+ return;
+
+ SYSTEMTIME st;
+ GetSystemTime(&st);
+ if (m_wMinute != st.wMinute || bForce) {
+ if (m_pOwner->m_tab.GetActivePage() == this) {
wchar_t buf[32];
unsigned i = g_dat.bShowReadChar ? 2 : 1;
TimeZone_PrintDateTime(m_hTimeZone, L"t", buf, _countof(buf), 0);
SendMessage(m_pOwner->m_hwndStatus, SB_SETTEXT, i, (LPARAM)buf);
- m_wMinute = st.wMinute;
}
+ m_wMinute = st.wMinute;
}
}
@@ -586,7 +589,7 @@ void CSrmmWindow::SetupStatusBar() SendMessage(m_pOwner->m_hwndStatus, SB_SETPARTS, i, (LPARAM)statwidths);
UpdateReadChars();
- ShowTime();
+ ShowTime(true);
SendMessage(m_hwnd, DM_STATUSICONCHANGE, 0, 0);
}
@@ -1192,7 +1195,7 @@ INT_PTR CSrmmWindow::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) m_nFlash++;
}
else if (wParam == TIMERID_TYPE) {
- ShowTime();
+ ShowTime(false);
if (m_nTypeMode == PROTOTYPE_SELFTYPING_ON && GetTickCount() - m_nLastTyping > TIMEOUT_TYPEOFF)
NotifyTyping(PROTOTYPE_SELFTYPING_OFF);
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index a1853a08a2..07917e2736 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -81,7 +81,7 @@ class CSrmmWindow : public CMsgDialog void NotifyTyping(int mode);
void ProcessFileDrop(HDROP hDrop);
void ShowAvatar(void);
- void ShowTime(void);
+ void ShowTime(bool bForce);
void SetupStatusBar(void);
void StreamInEvents(MEVENT hDbEventFirst, int count, bool bAppend);
void UpdateIcon(WPARAM wParam);
|