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/
|
clientgui/
|
||||||
DlgOptions.cpp, .h
|
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_bMouseButtonPressed = false;
|
||||||
|
|
||||||
m_dtLastNotificationAlertExecuted = wxDateTime((time_t)0);
|
m_dtLastNotificationAlertExecuted = wxDateTime((time_t)0);
|
||||||
|
m_iLastNotificationUnreadMessageCount = 0;
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
m_pNotificationRequest = NULL;
|
m_pNotificationRequest = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
@ -747,7 +748,9 @@ void CTaskBarIcon::UpdateNoticeStatus() {
|
||||||
&& (pFrame->GetReminderFrequency() != 0)
|
&& (pFrame->GetReminderFrequency() != 0)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (pDoc->GetUnreadNoticeCount()) {
|
if (pDoc->GetUnreadNoticeCount()
|
||||||
|
&& (pDoc->GetUnreadNoticeCount() != m_iLastNotificationUnreadMessageCount)
|
||||||
|
) {
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// Delay notification while user is inactive
|
// Delay notification while user is inactive
|
||||||
// NOTE: This API requires OS 10.4 or later
|
// NOTE: This API requires OS 10.4 or later
|
||||||
|
@ -759,6 +762,7 @@ void CTaskBarIcon::UpdateNoticeStatus() {
|
||||||
#endif
|
#endif
|
||||||
// Update cached info
|
// Update cached info
|
||||||
m_dtLastNotificationAlertExecuted = wxDateTime::Now();
|
m_dtLastNotificationAlertExecuted = wxDateTime::Now();
|
||||||
|
m_iLastNotificationUnreadMessageCount = pDoc->GetUnreadNoticeCount();
|
||||||
|
|
||||||
if (IsBalloonsSupported()) {
|
if (IsBalloonsSupported()) {
|
||||||
// Display balloon
|
// Display balloon
|
||||||
|
|
|
@ -112,6 +112,7 @@ private:
|
||||||
bool m_bMouseButtonPressed;
|
bool m_bMouseButtonPressed;
|
||||||
|
|
||||||
wxDateTime m_dtLastNotificationAlertExecuted;
|
wxDateTime m_dtLastNotificationAlertExecuted;
|
||||||
|
int m_iLastNotificationUnreadMessageCount;
|
||||||
|
|
||||||
void ResetTaskBar();
|
void ResetTaskBar();
|
||||||
void DisplayContextMenu();
|
void DisplayContextMenu();
|
||||||
|
|
Loading…
Reference in New Issue