*** empty log message ***

svn path=/trunk/boinc/; revision=5801
This commit is contained in:
Rom Walton 2005-04-08 06:24:58 +00:00
parent 51751cbaec
commit 4949c610e3
16 changed files with 235 additions and 61 deletions

View File

@ -26863,3 +26863,26 @@ Rom 7 April 2005
MainFrame.cpp, .h
lib/
gui_rpc_client.C
Rom 7 April 2005
- Enable the F1 key so that it'll open up a browser to
http://boinc.berkeley.edu/manager.php
- Add status bar text for each task that is defined and don't remove it
until the list has been updated.
- Define and fire an update view window message which is used to quickly
update the listview out of cycle with the timer event, but since the
timer event in turn fires the same event, we won't be caught in a
recursive update loop. We can only process one of these messages at
a time.
clientgui/
BOINCBaseView.cpp, .h
BOINCTaskCtrl.cpp, .h
Events.h
MainFrame.cpp, .h
ViewMessages.cpp, .h
ViewProjects.cpp, .h
ViewResources.cpp, .h
ViewStatistics.cpp, .h
ViewTransfers.cpp, .h
ViewWork.cpp, .h

View File

@ -159,6 +159,11 @@ void CBOINCBaseView::FireOnTaskLinkClicked(const wxHtmlLinkInfo& link) {
}
void CBOINCBaseView::FireOnTaskCellClicked(wxHtmlCell* cell, wxCoord x, wxCoord y, const wxMouseEvent& event) {
OnTaskCellClicked(cell, x, y, event);
}
void CBOINCBaseView::FireOnTaskCellMouseHover(wxHtmlCell* cell, wxCoord x, wxCoord y) {
OnTaskCellMouseHover(cell, x, y);
}
@ -312,6 +317,10 @@ wxString CBOINCBaseView::OnDocGetItemAttr(long WXUNUSED(item)) const {
void CBOINCBaseView::OnTaskLinkClicked(const wxHtmlLinkInfo& WXUNUSED(link)) {}
void CBOINCBaseView::OnTaskCellClicked(wxHtmlCell* WXUNUSED(cell), wxCoord WXUNUSED(x) , wxCoord WXUNUSED(y), const wxMouseEvent& WXUNUSED(event))
{}
void CBOINCBaseView::OnTaskCellMouseHover(wxHtmlCell* WXUNUSED(cell), wxCoord WXUNUSED(x) , wxCoord WXUNUSED(y))
{}

View File

@ -32,6 +32,17 @@
class CBOINCTaskCtrl;
class CBOINCListCtrl;
class CTaskItem : wxObject
{
public:
wxString m_strTaskName;
wxString m_strTaskDescription;
wxString m_strLink;
bool m_bIsHidden;
bool m_bIsHovering;
bool m_bIsClicked;
};
class CBOINCBaseView : public wxPanel
{
DECLARE_DYNAMIC_CLASS( CBOINCBaseView )
@ -64,6 +75,7 @@ public:
int FireOnListGetItemImage( long item ) const;
wxListItemAttr* FireOnListGetItemAttr( long item ) const;
void FireOnTaskLinkClicked( const wxHtmlLinkInfo& link );
void FireOnTaskCellClicked( wxHtmlCell* cell, wxCoord x, wxCoord y, const wxMouseEvent& event );
void FireOnTaskCellMouseHover( wxHtmlCell* cell, wxCoord x, wxCoord y );
virtual void UpdateTaskPane();
@ -90,6 +102,7 @@ protected:
virtual wxString OnDocGetItemAttr( long item ) const;
virtual void OnTaskLinkClicked( const wxHtmlLinkInfo& link );
virtual void OnTaskCellClicked( wxHtmlCell* cell, wxCoord x, wxCoord y, const wxMouseEvent& event );
virtual void OnTaskCellMouseHover( wxHtmlCell* cell, wxCoord x, wxCoord y );
wxString GetCurrentQuickTip();
@ -109,6 +122,8 @@ protected:
virtual bool UpdateQuickTip( const wxString& strCurrentLink, const wxString& strQuickTip, const wxString& strQuickTipText );
virtual void UpdateSelection();
std::vector<CTaskItem*> m_DefinedTasks;
bool m_bProcessingTaskRenderEvent;
bool m_bProcessingListRenderEvent;

View File

@ -300,6 +300,15 @@ void CBOINCTaskCtrl::OnLinkClicked(const wxHtmlLinkInfo& link) {
}
void CBOINCTaskCtrl::OnCellClicked(wxHtmlCell* cell, wxCoord x, wxCoord y, const wxMouseEvent& event) {
wxASSERT(NULL != m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView));
m_pParentView->FireOnTaskCellClicked(cell, x, y, event);
wxHtmlWindow::OnCellClicked(cell, x, y, event);
}
void CBOINCTaskCtrl::OnCellMouseHover(wxHtmlCell* cell, wxCoord x, wxCoord y) {
wxASSERT(NULL != m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView));

View File

@ -84,6 +84,7 @@ public:
virtual bool OnRestoreState( wxConfigBase* pConfig );
virtual void OnLinkClicked( const wxHtmlLinkInfo& link );
virtual void OnCellClicked( wxHtmlCell* cell, wxCoord x, wxCoord y, const wxMouseEvent& event );
virtual void OnCellMouseHover( wxHtmlCell* cell, wxCoord x, wxCoord y );
virtual wxHtmlOpeningStatus OnOpeningURL( wxHtmlURLType type, const wxString& url, wxString *redirect );

View File

@ -22,29 +22,30 @@
#define _EVENTS_H_
#define ID_STATUSBAR 6000
#define ID_TOOLSUPDATEACCOUNTS 6001
#define ID_TOOLSOPTIONS 6002
#define ID_FRAMENOTEBOOK 6003
#define ID_REFRESHSTATETIMER 6004
#define ID_FRAMERENDERTIMER 6005
#define ID_FRAMETASKRENDERTIMER 6006
#define ID_FRAMELISTRENDERTIMER 6007
#define ID_HIDE 6008
#define ID_ACTIVITYRUNALWAYS 6009
#define ID_ACTIVITYRUNBASEDONPREPERENCES 6010
#define ID_ACTIVITYSUSPEND 6011
#define ID_NETWORKRUNALWAYS 6012
#define ID_NETWORKRUNBASEDONPREPERENCES 6013
#define ID_NETWORKSUSPEND 6014
#define ID_RUNBENCHMARKS 6015
#define ID_SELECTCOMPUTER 6016
#define ID_TB_ACTIVITYRUNALWAYS 6017
#define ID_TB_ACTIVITYRUNBASEDONPREPERENCES 6018
#define ID_TB_ACTIVITYSUSPEND 6019
#define ID_TB_NETWORKRUNALWAYS 6020
#define ID_TB_NETWORKRUNBASEDONPREPERENCES 6021
#define ID_TB_NETWORKSUSPEND 6022
#define ID_FRAME 6000
#define ID_STATUSBAR 6001
#define ID_TOOLSUPDATEACCOUNTS 6002
#define ID_TOOLSOPTIONS 6003
#define ID_FRAMENOTEBOOK 6004
#define ID_REFRESHSTATETIMER 6005
#define ID_FRAMERENDERTIMER 6006
#define ID_FRAMETASKRENDERTIMER 6007
#define ID_FRAMELISTRENDERTIMER 6008
#define ID_HIDE 6009
#define ID_ACTIVITYRUNALWAYS 6010
#define ID_ACTIVITYRUNBASEDONPREPERENCES 6011
#define ID_ACTIVITYSUSPEND 6012
#define ID_NETWORKRUNALWAYS 6013
#define ID_NETWORKRUNBASEDONPREPERENCES 6014
#define ID_NETWORKSUSPEND 6015
#define ID_RUNBENCHMARKS 6016
#define ID_SELECTCOMPUTER 6017
#define ID_TB_ACTIVITYRUNALWAYS 6018
#define ID_TB_ACTIVITYRUNBASEDONPREPERENCES 6019
#define ID_TB_ACTIVITYSUSPEND 6020
#define ID_TB_NETWORKRUNALWAYS 6021
#define ID_TB_NETWORKRUNBASEDONPREPERENCES 6022
#define ID_TB_NETWORKSUSPEND 6023
#define ID_LIST_BASE 7000
#define ID_LIST_PROJECTSVIEW 7000
#define ID_LIST_WORKVIEW 7001

View File

@ -154,6 +154,7 @@ BEGIN_EVENT_TABLE (CMainFrame, wxFrame)
EVT_MENU(wxID_ABOUT, CMainFrame::OnAbout)
EVT_CLOSE(CMainFrame::OnClose)
EVT_CHAR(CMainFrame::OnChar)
EVT_HELP(ID_FRAME, CMainFrame::OnHelp)
EVT_MAINFRAME_CONNECT(CMainFrame::OnConnect)
EVT_MAINFRAME_CONNECT_ERROR(CMainFrame::OnConnectError)
EVT_MAINFRAME_INITIALIZED(CMainFrame::OnInitialized)
@ -172,7 +173,7 @@ CMainFrame::CMainFrame() {
CMainFrame::CMainFrame(wxString strTitle) :
wxFrame ((wxFrame *)NULL, -1, strTitle, wxDefaultPosition, wxDefaultSize,
wxFrame ((wxFrame *)NULL, ID_FRAME, strTitle, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_FRAME_STYLE | wxNO_FULL_REPAINT_ON_RESIZE)
{
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::CMainFrame - Function Begin"));
@ -1041,8 +1042,7 @@ void CMainFrame::OnClose(wxCloseEvent& event) {
}
void CMainFrame::OnChar(wxKeyEvent& event)
{
void CMainFrame::OnChar(wxKeyEvent& event) {
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnChar - Function Begin"));
if (IsShown()) {
@ -1066,6 +1066,21 @@ void CMainFrame::OnChar(wxKeyEvent& event)
}
void CMainFrame::OnHelp( wxHelpEvent& event ) {
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnHelp - Function Begin"));
if (IsShown()) {
if ( ID_FRAME == event.GetId() ) {
ExecuteBrowserLink(wxT("http://boinc.berkeley.edu/manager.php"));
}
}
event.Skip();
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnHelp - Function End"));
}
void CMainFrame::OnConnect(CMainFrameEvent &event) {
wxLogTrace(wxT("Function Start/End"), wxT("CMainFrame::OnConnect - Function Begin"));
@ -1351,6 +1366,14 @@ void CMainFrame::OnNotebookSelectionChanged(wxNotebookEvent& event) {
}
void CMainFrame::UpdateStatusText( const wxChar* szStatus )
{
wxString strStatus = szStatus;
m_pStatusbar->SetStatusText( strStatus );
Sleep(0);
}
void CMainFrame::FireConnect()
{
CMainFrameEvent event(wxEVT_MAINFRAME_CONNECT, this);
@ -1372,4 +1395,37 @@ void CMainFrame::FireRefreshView()
}
void CMainFrame::ProcessRefreshView()
{
CMainFrameEvent event(wxEVT_MAINFRAME_REFRESHVIEW, this);
ProcessEvent( event );
}
void CMainFrame::ExecuteBrowserLink(const wxString &strLink) {
wxString strMimeType = wxEmptyString;
if (strLink.StartsWith(wxT("http://")))
strMimeType = wxT("text/html");
else if (strLink.StartsWith(wxT("ftp://")))
strMimeType = wxT("text/html");
else if (strLink.StartsWith(wxT("mailto:")))
strMimeType = wxT("message/rfc822");
else
return;
wxFileType* ft = wxTheMimeTypesManager->GetFileTypeFromMimeType(strMimeType);
if (ft) {
wxString cmd;
if (ft->GetOpenCommand(&cmd, wxFileType::MessageParameters(strLink))) {
cmd.Replace(wxT("file://"), wxEmptyString);
::wxExecute(cmd);
}
delete ft;
}
}
const char *BOINC_RCSID_d881a56dc5 = "$Id$";

View File

@ -71,6 +71,7 @@ public:
void OnClose( wxCloseEvent& event );
void OnChar( wxKeyEvent& event );
void OnHelp( wxHelpEvent& event );
void OnRefreshState( wxTimerEvent& event );
void OnFrameRender( wxTimerEvent& event );
@ -83,9 +84,14 @@ public:
void OnInitialized( CMainFrameEvent& event );
void OnRefreshView( CMainFrameEvent& event );
void UpdateStatusText( const wxChar* szStatus );
void FireConnect();
void FireConnectError();
void FireRefreshView();
void ProcessRefreshView();
void ExecuteBrowserLink( const wxString& strLink );
private:

View File

@ -220,6 +220,10 @@ wxListItemAttr* CViewMessages::OnListGetItemAttr(long item) const {
void CViewMessages::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
CMainFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(NULL != pFrame);
wxASSERT(wxDynamicCast(pFrame, CMainFrame));
wxASSERT(NULL != m_pTaskPane);
wxASSERT(NULL != m_pListPane);
@ -229,6 +233,8 @@ void CViewMessages::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
#ifndef NOCLIPBOARD
wxInt32 iIndex = -1;
if (link.GetHref() == LINK_TASKCOPYALL) {
pFrame->UpdateStatusText(_("Copying all messages to the clipboard..."));
wxInt32 iRowCount = 0;
OpenClipboard();
@ -240,6 +246,8 @@ void CViewMessages::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
CloseClipboard();
} else if (link.GetHref() == LINK_TASKCOPYMESSAGE) {
pFrame->UpdateStatusText(_("Copying selected message(s) to the clipboard..."));
OpenClipboard();
for (;;) {
@ -257,6 +265,10 @@ void CViewMessages::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
#endif
UpdateSelection();
pFrame->ProcessRefreshView();
pFrame->UpdateStatusText( wxEmptyString );
}

View File

@ -39,7 +39,7 @@ public:
~CViewMessages();
virtual wxString GetViewName();
virtual const char** GetViewIcon();
virtual const char** GetViewIcon();
protected:

View File

@ -284,6 +284,8 @@ wxString CViewProjects::OnDocGetItemText(long item, long column) const {
void CViewProjects::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnTaskLinkClicked - Function Begin"));
wxInt32 iAnswer = 0;
wxInt32 iProjectIndex = 0;
wxInt32 iWebsiteIndex = 0;
@ -291,9 +293,12 @@ void CViewProjects::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
wxString strURL = wxEmptyString;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
CMainFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(NULL != pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
wxASSERT(NULL != pFrame);
wxASSERT(wxDynamicCast(pFrame, CMainFrame));
wxASSERT(NULL != m_pTaskPane);
wxASSERT(NULL != m_pListPane);
@ -302,6 +307,8 @@ void CViewProjects::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
m_bTipsHeaderHidden = false;
if (link.GetHref() == LINK_TASKATTACH) {
pFrame->UpdateStatusText(_("Ataching to project..."));
CDlgAttachProject* pDlg = new CDlgAttachProject(this);
wxASSERT(NULL != pDlg);
@ -317,6 +324,8 @@ void CViewProjects::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
if (pDlg)
pDlg->Destroy();
} else if (link.GetHref() == LINK_TASKDETACH) {
pFrame->UpdateStatusText(_("Detaching from project..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->GetProjectProjectName(iProjectIndex, strProjectName);
@ -337,6 +346,8 @@ void CViewProjects::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
);
}
} else if (link.GetHref() == LINK_TASKRESET) {
pFrame->UpdateStatusText(_("Resetting project..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->GetProjectProjectName(iProjectIndex, strProjectName);
@ -357,39 +368,55 @@ void CViewProjects::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
);
}
} else if (link.GetHref() == LINK_TASKUPDATE) {
pFrame->UpdateStatusText(_("Updating project..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->ProjectUpdate(
iProjectIndex
);
} else if (link.GetHref() == LINK_TASKSUSPEND) {
pFrame->UpdateStatusText(_("Suspending project..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->ProjectSuspend(
iProjectIndex
);
} else if (link.GetHref() == LINK_TASKRESUME) {
pFrame->UpdateStatusText(_("Resuming project..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->ProjectResume(
iProjectIndex
);
} else if (link.GetHref() == LINK_WEBBOINC) {
ExecuteLink(wxT("http://boinc.berkeley.edu"));
pFrame->UpdateStatusText(_("Opening a browser to the BOINC homepage..."));
pFrame->ExecuteBrowserLink(wxT("http://boinc.berkeley.edu"));
} else if (link.GetHref() == LINK_WEBPROJECT) {
pFrame->UpdateStatusText(_("Opening a browser to the project homepage..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->GetProjectProjectURL(iProjectIndex, strURL);
ExecuteLink(strURL);
pFrame->ExecuteBrowserLink(strURL);
} else if (link.GetHref().StartsWith(LINK_WEB)) {
pFrame->UpdateStatusText(_("Opening a browser to a project specified URL..."));
ConvertLinkToWebsiteIndex(link.GetHref(), iProjectIndex, iWebsiteIndex);
pDoc->GetProjectWebsiteLink(iProjectIndex, iWebsiteIndex, strURL);
ExecuteLink(strURL);
pFrame->ExecuteBrowserLink(strURL);
}
UpdateSelection();
m_pListPane->Refresh();
pFrame->ProcessRefreshView();
pFrame->UpdateStatusText( wxEmptyString );
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnTaskLinkClicked - Function End"));
}
@ -784,29 +811,4 @@ wxInt32 CViewProjects::ConvertLinkToWebsiteIndex(const wxString& strLink, wxInt3
}
void CViewProjects::ExecuteLink(const wxString &strLink) {
wxString strMimeType = wxEmptyString;
if (strLink.StartsWith(wxT("http://")))
strMimeType = wxT("text/html");
else if (strLink.StartsWith(wxT("ftp://")))
strMimeType = wxT("text/html");
else if (strLink.StartsWith(wxT("mailto:")))
strMimeType = wxT("message/rfc822");
else
return;
wxFileType* ft = wxTheMimeTypesManager->GetFileTypeFromMimeType(strMimeType);
if (ft) {
wxString cmd;
if (ft->GetOpenCommand(&cmd, wxFileType::MessageParameters(strLink))) {
cmd.Replace(wxT("file://"), wxEmptyString);
::wxExecute(cmd);
}
delete ft;
}
}
const char *BOINC_RCSID_b4edf777fc = "$Id$";

View File

@ -106,7 +106,6 @@ protected:
bool IsWebsiteLink( const wxString& strLink );
wxInt32 ConvertWebsiteIndexToLink( wxInt32 iProjectIndex, wxInt32 iWebsiteIndex, wxString& strLink );
wxInt32 ConvertLinkToWebsiteIndex( const wxString& strLink, wxInt32& iProjectIndex, wxInt32& iWebsiteIndex );
void ExecuteLink( const wxString& strLink );
//

View File

@ -168,6 +168,10 @@ wxString CViewResources::OnDocGetItemText(long item, long column) const {
void CViewResources::OnTaskLinkClicked(const wxHtmlLinkInfo& /*link*/) {
CMainFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(NULL != pFrame);
wxASSERT(wxDynamicCast(pFrame, CMainFrame));
wxASSERT(NULL != m_pTaskPane);
wxASSERT(NULL != m_pListPane);
@ -177,7 +181,10 @@ void CViewResources::OnTaskLinkClicked(const wxHtmlLinkInfo& /*link*/) {
m_bTipsHeaderHidden = false;
UpdateSelection();
m_pListPane->Refresh();
pFrame->ProcessRefreshView();
pFrame->UpdateStatusText( wxEmptyString );
}

View File

@ -406,6 +406,10 @@ wxInt32 CViewStatistics::GetDocCount() {
void CViewStatistics::OnTaskLinkClicked( const wxHtmlLinkInfo& link ) {
CMainFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(NULL != pFrame);
wxASSERT(wxDynamicCast(pFrame, CMainFrame));
wxASSERT(NULL != m_pTaskPane);
wxASSERT(NULL != m_pListPane);
wxASSERT(NULL != m_PaintStatistics);
@ -413,6 +417,8 @@ void CViewStatistics::OnTaskLinkClicked( const wxHtmlLinkInfo& link ) {
m_bTaskHeaderHidden = false;
m_bTipsHeaderHidden = false;
pFrame->UpdateStatusText(_("Updating charts..."));
if ( link.GetHref() == LINK_TASKUSERTOTAL ) {
m_PaintStatistics->heading="User Total";
m_PaintStatistics->m_SelectedStatistic=0;
@ -431,7 +437,11 @@ void CViewStatistics::OnTaskLinkClicked( const wxHtmlLinkInfo& link ) {
}
UpdateSelection();
pFrame->ProcessRefreshView();
m_PaintStatistics->Refresh();
pFrame->UpdateStatusText( wxEmptyString );
}

View File

@ -235,9 +235,12 @@ void CViewTransfers::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
wxString strName = wxEmptyString;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
CMainFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(NULL != pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
wxASSERT(NULL != pFrame);
wxASSERT(wxDynamicCast(pFrame, CMainFrame));
wxASSERT(NULL != m_pTaskPane);
wxASSERT(NULL != m_pListPane);
@ -245,10 +248,14 @@ void CViewTransfers::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
m_bTipsHeaderHidden = false;
if (link.GetHref() == LINK_TASKRETRY) {
pFrame->UpdateStatusText(_("Retrying transfer now..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->TransferRetryNow(iProjectIndex);
} else if (link.GetHref() == LINK_TASKABORT) {
pFrame->UpdateStatusText(_("Aborting transfer..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->GetTransferFileName(iProjectIndex, strName);
@ -261,7 +268,7 @@ void CViewTransfers::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
_("Abort File Transfer"),
wxYES_NO | wxICON_QUESTION,
this
);
);
if (wxYES == iAnswer) {
pDoc->TransferAbort(
@ -271,7 +278,10 @@ void CViewTransfers::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
}
UpdateSelection();
m_pListPane->Refresh();
pFrame->ProcessRefreshView();
pFrame->UpdateStatusText( wxEmptyString );
}

View File

@ -256,9 +256,12 @@ void CViewWork::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
wxString strMachineName = wxEmptyString;
wxString strMessage = wxEmptyString;
CMainDocument* pDoc = wxGetApp().GetDocument();
CMainFrame* pFrame = wxGetApp().GetFrame();
wxASSERT(NULL != pDoc);
wxASSERT(wxDynamicCast(pDoc, CMainDocument));
wxASSERT(NULL != pFrame);
wxASSERT(wxDynamicCast(pFrame, CMainFrame));
wxASSERT(NULL != m_pTaskPane);
wxASSERT(NULL != m_pListPane);
@ -266,18 +269,24 @@ void CViewWork::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
m_bTipsHeaderHidden = false;
if (link.GetHref() == LINK_TASKSUSPEND) {
pFrame->UpdateStatusText(_("Suspending result..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->WorkSuspend(
iProjectIndex
);
} else if (link.GetHref() == LINK_TASKRESUME) {
pFrame->UpdateStatusText(_("Resuming result..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->WorkResume(
iProjectIndex
);
} else if (link.GetHref() == LINK_TASKSHOWGRAPHICS) {
pFrame->UpdateStatusText(_("Showing graphics for result..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->GetConnectedComputerName(strMachineName);
@ -307,6 +316,8 @@ void CViewWork::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
);
}
} else if (link.GetHref() == LINK_TASKABORT) {
pFrame->UpdateStatusText(_("Aborting result..."));
iProjectIndex = m_pListPane->GetFirstSelected();
pDoc->GetWorkName(iProjectIndex, strResultName);
@ -329,7 +340,10 @@ void CViewWork::OnTaskLinkClicked(const wxHtmlLinkInfo& link) {
}
UpdateSelection();
m_pListPane->Refresh();
pFrame->ProcessRefreshView();
pFrame->UpdateStatusText( wxEmptyString );
}