mirror of https://github.com/BOINC/boinc.git
- MGR: Fix build break by adjusting the SetIcon function prototype so that it conforms
to the wxWidget standard. clientgui/ BOINCTaskBar.cpp, .h clientgui/msw/ taskbarex.cpp, .h svn path=/trunk/boinc/; revision=20450
This commit is contained in:
parent
2ec103eb91
commit
e96324399f
|
@ -947,3 +947,12 @@ Rom 5 Feb 2010
|
|||
|
||||
clientgui/
|
||||
BOINCTaskBar.cpp, .h
|
||||
|
||||
Rom 5 Feb 2010
|
||||
- MGR: Fix build break by adjusting the SetIcon function prototype so that it conforms
|
||||
to the wxWidget standard.
|
||||
|
||||
clientgui/
|
||||
BOINCTaskBar.cpp, .h
|
||||
clientgui/msw/
|
||||
taskbarex.cpp, .h
|
||||
|
|
|
@ -141,11 +141,14 @@ void CTaskBarIcon::OnRefresh(CTaskbarEvent& WXUNUSED(event)) {
|
|||
|
||||
// Which icon should be displayed?
|
||||
if (!pDoc->IsConnected()) {
|
||||
m_iconCurrent = m_iconTaskBarDisconnected;
|
||||
SetIcon(m_iconTaskBarDisconnected);
|
||||
} else {
|
||||
if (RUN_MODE_NEVER == status.task_mode) {
|
||||
m_iconCurrent = m_iconTaskBarSnooze;
|
||||
SetIcon(m_iconTaskBarSnooze);
|
||||
} else {
|
||||
m_iconCurrent = m_iconTaskBarNormal;
|
||||
SetIcon(m_iconTaskBarNormal);
|
||||
}
|
||||
}
|
||||
|
@ -411,10 +414,7 @@ void CTaskBarIcon::OnMouseMove(wxTaskBarIconEvent& WXUNUSED(event)) {
|
|||
strMessage += strBuffer;
|
||||
}
|
||||
|
||||
#ifdef wxUSE_TOOLTIPS
|
||||
SetTooltip(strMessage);
|
||||
#endif
|
||||
|
||||
SetIcon(m_iconCurrent, strMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
wxIcon m_iconTaskBarNormal;
|
||||
wxIcon m_iconTaskBarDisconnected;
|
||||
wxIcon m_iconTaskBarSnooze;
|
||||
wxIcon m_iconCurrent;
|
||||
wxString m_strDefaultTitle;
|
||||
bool m_bTaskbarInitiatedShutdown;
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ void wxTaskBarIconEx::OnTaskBarCreated(wxTaskBarIconExEvent& WXUNUSED(event))
|
|||
}
|
||||
|
||||
// Operations
|
||||
bool wxTaskBarIconEx::SetIcon(const wxIcon& icon)
|
||||
bool wxTaskBarIconEx::SetIcon(const wxIcon& icon, const wxString& message)
|
||||
{
|
||||
if (!IsOK())
|
||||
return false;
|
||||
|
@ -135,28 +135,10 @@ bool wxTaskBarIconEx::SetIcon(const wxIcon& icon)
|
|||
notifyData.uVersion = NOTIFYICON_VERSION;
|
||||
notifyData.hIcon = (HICON) icon.GetHICON();
|
||||
|
||||
UpdateIcon();
|
||||
return m_iconAdded;
|
||||
}
|
||||
|
||||
bool wxTaskBarIconEx::SetTooltip(const wxString& message)
|
||||
{
|
||||
if (!IsOK())
|
||||
return false;
|
||||
|
||||
if (message.empty())
|
||||
return false;
|
||||
|
||||
memset(¬ifyData, 0, sizeof(NOTIFYICONDATA));
|
||||
notifyData.cbSize = sizeof(notifyData);
|
||||
notifyData.hWnd = (HWND) m_hWnd;
|
||||
notifyData.uID = m_iTaskbarID;
|
||||
notifyData.uCallbackMessage = WM_TASKBARMESSAGE;
|
||||
notifyData.uFlags = NIF_MESSAGE | NIF_TIP | NIF_REALTIME;
|
||||
notifyData.uVersion = NOTIFYICON_VERSION;
|
||||
notifyData.hIcon = NULL;
|
||||
|
||||
lstrcpyn(notifyData.szTip, WXSTRINGCAST message, sizeof(notifyData.szTip));
|
||||
if (!message.empty()) {
|
||||
notifyData.uFlags |= NIF_TIP;
|
||||
lstrcpyn(notifyData.szTip, WXSTRINGCAST message, sizeof(notifyData.szTip));
|
||||
}
|
||||
|
||||
UpdateIcon();
|
||||
return m_iconAdded;
|
||||
|
|
|
@ -44,9 +44,7 @@ public:
|
|||
|
||||
// Operations
|
||||
|
||||
virtual bool SetIcon( const wxIcon& icon );
|
||||
|
||||
virtual bool SetTooltip( const wxString& message );
|
||||
virtual bool SetIcon( const wxIcon& icon, const wxString& message = wxEmptyString );
|
||||
|
||||
virtual bool SetBalloon(
|
||||
const wxIcon& icon,
|
||||
|
|
Loading…
Reference in New Issue