mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=11556
This commit is contained in:
parent
920fa4a36a
commit
6adf64a4f3
|
@ -12741,3 +12741,14 @@ Rom 20 Nov 2006
|
|||
|
||||
clientgui/
|
||||
AdvancedFrame.cpp
|
||||
|
||||
Rom 20 Nov 2006
|
||||
- MGR: Display the hand cursor when the mouse hovers over the BSG link
|
||||
bitmaps.
|
||||
- MGR: When the suspend reason is becuase of CPU throttling do not
|
||||
display a balloon showing that we are suspended.
|
||||
|
||||
clientgui/
|
||||
BOINCTaskBar.cpp
|
||||
sg_CustomControls.cpp, .h
|
||||
sg_ProjectsComponent.cpp
|
||||
|
|
|
@ -354,7 +354,7 @@ void CTaskBarIcon::OnMouseMove(wxTaskBarIconEvent& WXUNUSED(event)) {
|
|||
strTitle = strTitle + wxT(" - (") + strMachineName + wxT(")");
|
||||
|
||||
pDoc->GetCoreClientStatus(status);
|
||||
if (status.task_suspend_reason) {
|
||||
if (status.task_suspend_reason && !(status.task_suspend_reason & SUSPEND_REASON_CPU_USAGE_LIMIT)) {
|
||||
// 1st %s is the previous instance of the message
|
||||
// 2nd %s is the project name
|
||||
// i.e. 'BOINC', 'GridRepublic'
|
||||
|
@ -366,7 +366,7 @@ void CTaskBarIcon::OnMouseMove(wxTaskBarIconEvent& WXUNUSED(event)) {
|
|||
strMessage += strBuffer;
|
||||
}
|
||||
|
||||
if (status.network_suspend_reason) {
|
||||
if (status.network_suspend_reason && !(status.network_suspend_reason & SUSPEND_REASON_CPU_USAGE_LIMIT)) {
|
||||
// 1st %s is the previous instance of the message
|
||||
// 2nd %s is the project name
|
||||
// i.e. 'BOINC', 'GridRepublic'
|
||||
|
|
|
@ -186,3 +186,36 @@ void CTransparentStaticTextAssociate::OnMouse(wxMouseEvent& event) {
|
|||
}
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS (CLinkButton, wxBitmapButton)
|
||||
|
||||
BEGIN_EVENT_TABLE(CLinkButton, wxBitmapButton)
|
||||
EVT_MOUSE_EVENTS(CLinkButton::OnMouse)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
CLinkButton::CLinkButton() {}
|
||||
|
||||
CLinkButton::CLinkButton(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name ) {
|
||||
Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
}
|
||||
|
||||
|
||||
bool CLinkButton::Create(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name ) {
|
||||
bool bRetVal = wxBitmapButton::Create(parent, id, bitmap, pos, size, style, validator, name);
|
||||
|
||||
m_HandCursor = wxCursor(wxCURSOR_HAND);
|
||||
|
||||
return bRetVal;
|
||||
}
|
||||
|
||||
|
||||
void CLinkButton::OnMouse(wxMouseEvent& event) {
|
||||
if (event.Entering()) {
|
||||
SetCursor(m_HandCursor);
|
||||
} else if (event.Leaving()) {
|
||||
SetCursor(*wxSTANDARD_CURSOR);
|
||||
}
|
||||
event.Skip();
|
||||
}
|
||||
|
|
|
@ -141,5 +141,41 @@ private:
|
|||
};
|
||||
|
||||
|
||||
class CLinkButton : public wxBitmapButton
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS (CLinkButton)
|
||||
|
||||
public:
|
||||
CLinkButton();
|
||||
CLinkButton(
|
||||
wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name= wxButtonNameStr
|
||||
);
|
||||
|
||||
bool Create(
|
||||
wxWindow* parent,
|
||||
wxWindowID id,
|
||||
const wxBitmap& bitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0,
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name= wxButtonNameStr
|
||||
);
|
||||
|
||||
virtual void OnMouse(wxMouseEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
wxCursor m_HandCursor;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ void CProjectsComponent::CreateComponent()
|
|||
//
|
||||
//// Messages Play Pause Btns
|
||||
wxToolTip *ttMessages = new wxToolTip(_("Open a window to view messages"));
|
||||
btnMessages = new wxBitmapButton(
|
||||
btnMessages = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
*pSkinSimple->GetMessagesLink()->GetBitmap(),
|
||||
|
@ -152,7 +152,7 @@ void CProjectsComponent::CreateComponent()
|
|||
btnMessages->SetToolTip(ttMessages);
|
||||
|
||||
wxToolTip *ttAlertMessages = new wxToolTip(_("Open a window to view messages"));
|
||||
btnAlertMessages = new wxBitmapButton(
|
||||
btnAlertMessages = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
*(pSkinSimple->GetMessagesAlertLink()->GetBitmap()),
|
||||
|
@ -170,7 +170,7 @@ void CProjectsComponent::CreateComponent()
|
|||
|
||||
// pause btn
|
||||
wxToolTip *ttPause = new wxToolTip(_("Stop all activity"));
|
||||
btnPause = new wxBitmapButton(
|
||||
btnPause = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
*pSkinSimple->GetSuspendLink()->GetBitmap(),
|
||||
|
@ -182,7 +182,7 @@ void CProjectsComponent::CreateComponent()
|
|||
|
||||
// resume btn
|
||||
wxToolTip *ttResume = new wxToolTip(_("Resume activity"));
|
||||
btnResume = new wxBitmapButton(
|
||||
btnResume = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
*(pSkinSimple->GetResumeLink()->GetBitmap()),
|
||||
|
@ -213,7 +213,7 @@ void CProjectsComponent::CreateComponent()
|
|||
|
||||
// Pref Btn
|
||||
wxToolTip *ttPreferences = new wxToolTip(_("Open a window to set your preferences"));
|
||||
btnPreferences = new wxBitmapButton(
|
||||
btnPreferences = new CLinkButton(
|
||||
this,
|
||||
ID_SIMPLE_PREFERENCES,
|
||||
*(pSkinSimple->GetPreferencesLink()->GetBitmap()),
|
||||
|
@ -230,7 +230,7 @@ void CProjectsComponent::CreateComponent()
|
|||
|
||||
// Advanced View
|
||||
wxToolTip *ttAdvView = new wxToolTip(_("Switch to the BOINC advanced view"));
|
||||
btnAdvancedView = new wxBitmapButton(
|
||||
btnAdvancedView = new CLinkButton(
|
||||
this,
|
||||
-1,
|
||||
*(pSkinSimple->GetAdvancedLink()->GetBitmap()),
|
||||
|
|
|
@ -402,6 +402,9 @@
|
|||
<File
|
||||
RelativePath="..\lib\boinc_win.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\common_defs.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\crypt.h">
|
||||
</File>
|
||||
|
|
Loading…
Reference in New Issue