mirror of https://github.com/BOINC/boinc.git
- MGR: Handle the 'always' option by only popping a new balloon if the
unread notice count differs from the last time we popped a balloon. clientgui/ BOINCTaskBar.cpp, .h svn path=/trunk/boinc/; revision=23174
This commit is contained in:
parent
e58022e6e8
commit
ec6fa49dac
|
@ -1406,3 +1406,11 @@ Rom 7 Mar 2011
|
|||
|
||||
clientgui/
|
||||
DlgOptions.cpp, .h
|
||||
|
||||
Rom 7 Mar 2011
|
||||
- MGR: Handle the 'always' option by only popping a new balloon if the
|
||||
unread notice count differs from the last time we popped a
|
||||
balloon.
|
||||
|
||||
clientgui/
|
||||
BOINCTaskBar.cpp, .h
|
||||
|
|
|
@ -98,6 +98,7 @@ CTaskBarIcon::CTaskBarIcon(wxString title, wxIcon* icon, wxIcon* iconDisconnecte
|
|||
m_bMouseButtonPressed = false;
|
||||
|
||||
m_dtLastNotificationAlertExecuted = wxDateTime((time_t)0);
|
||||
m_iLastNotificationUnreadMessageCount = 0;
|
||||
#ifdef __WXMAC__
|
||||
m_pNotificationRequest = NULL;
|
||||
#endif
|
||||
|
@ -747,7 +748,9 @@ void CTaskBarIcon::UpdateNoticeStatus() {
|
|||
&& (pFrame->GetReminderFrequency() != 0)
|
||||
) {
|
||||
|
||||
if (pDoc->GetUnreadNoticeCount()) {
|
||||
if (pDoc->GetUnreadNoticeCount()
|
||||
&& (pDoc->GetUnreadNoticeCount() != m_iLastNotificationUnreadMessageCount)
|
||||
) {
|
||||
#ifdef __WXMAC__
|
||||
// Delay notification while user is inactive
|
||||
// NOTE: This API requires OS 10.4 or later
|
||||
|
@ -759,6 +762,7 @@ void CTaskBarIcon::UpdateNoticeStatus() {
|
|||
#endif
|
||||
// Update cached info
|
||||
m_dtLastNotificationAlertExecuted = wxDateTime::Now();
|
||||
m_iLastNotificationUnreadMessageCount = pDoc->GetUnreadNoticeCount();
|
||||
|
||||
if (IsBalloonsSupported()) {
|
||||
// Display balloon
|
||||
|
|
|
@ -112,6 +112,7 @@ private:
|
|||
bool m_bMouseButtonPressed;
|
||||
|
||||
wxDateTime m_dtLastNotificationAlertExecuted;
|
||||
int m_iLastNotificationUnreadMessageCount;
|
||||
|
||||
void ResetTaskBar();
|
||||
void DisplayContextMenu();
|
||||
|
|
Loading…
Reference in New Issue