mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=5916
This commit is contained in:
parent
4be0b4b634
commit
9796c6d9e8
|
@ -27521,3 +27521,17 @@ David 21 April 2005
|
|||
BOINCBaseView.h
|
||||
MainDocument.cpp,h
|
||||
ViewProjects.cpp
|
||||
|
||||
Rom 20 April 2005
|
||||
- Code Cleanup
|
||||
|
||||
clientgui/
|
||||
BOINCBaseView.cpp, .h
|
||||
BOINCListCtrl.cpp, .h
|
||||
BOINCTaskCtrl.cpp, .h
|
||||
ViewMessages.cpp, .h
|
||||
ViewProjects.cpp, .h
|
||||
ViewResources.cpp, .h
|
||||
ViewStatistics.cpp, .h
|
||||
ViewTransfers.cpp, .h
|
||||
ViewWork.cpp, .h
|
||||
|
|
|
@ -261,14 +261,22 @@ bool CBOINCBaseView::OnRestoreState(wxConfigBase* pConfig) {
|
|||
|
||||
|
||||
void CBOINCBaseView::OnListSelected(wxListEvent& event) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseView::OnListSelected - Function Begin"));
|
||||
|
||||
UpdateSelection();
|
||||
event.Skip();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseView::OnListSelected - Function End"));
|
||||
}
|
||||
|
||||
|
||||
void CBOINCBaseView::OnListDeselected(wxListEvent& event) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseView::OnListDeselected - Function Begin"));
|
||||
|
||||
UpdateSelection();
|
||||
event.Skip();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseView::OnListDeselected - Function End"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -379,10 +387,6 @@ void CBOINCBaseView::UpdateSelection()
|
|||
{}
|
||||
|
||||
|
||||
void CBOINCBaseView::UpdateTaskPane()
|
||||
{}
|
||||
|
||||
|
||||
bool CBOINCBaseView::_EnsureLastItemVisible() {
|
||||
return EnsureLastItemVisible();
|
||||
}
|
||||
|
|
|
@ -36,7 +36,8 @@ class CTaskItem : wxObject {
|
|||
public:
|
||||
CTaskItem();
|
||||
CTaskItem( wxString strName, wxString strDescription, wxInt32 iEventID ) :
|
||||
m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID), m_pButton(NULL) {};
|
||||
m_strName(strName), m_strDescription(strDescription), m_iEventID(iEventID), m_pButton(NULL),
|
||||
m_strWebSiteLink(wxT("")) {};
|
||||
~CTaskItem() {};
|
||||
|
||||
wxString m_strName;
|
||||
|
@ -44,6 +45,7 @@ public:
|
|||
wxInt32 m_iEventID;
|
||||
|
||||
wxButton* m_pButton;
|
||||
wxString m_strWebSiteLink;
|
||||
};
|
||||
|
||||
|
||||
|
@ -123,7 +125,6 @@ protected:
|
|||
virtual int UpdateCache( long item, long column, wxString& strNewData );
|
||||
|
||||
virtual void UpdateSelection();
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
bool _EnsureLastItemVisible();
|
||||
virtual bool EnsureLastItemVisible();
|
||||
|
|
|
@ -47,16 +47,6 @@ CBOINCListCtrl::CBOINCListCtrl(
|
|||
wxEVT_COMMAND_LEFT_CLICK,
|
||||
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) &CBOINCListCtrl::OnClick
|
||||
);
|
||||
Connect(
|
||||
iListWindowID,
|
||||
wxEVT_COMMAND_LIST_ITEM_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) &CBOINCListCtrl::OnSelected
|
||||
);
|
||||
Connect(
|
||||
iListWindowID,
|
||||
wxEVT_COMMAND_LIST_ITEM_DESELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) &CBOINCListCtrl::OnDeselected
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
@ -154,11 +144,11 @@ void CBOINCListCtrl::OnClick(wxCommandEvent& event) {
|
|||
|
||||
if (m_bIsSingleSelection) {
|
||||
if (GetFocusedItem() != GetFirstSelected()) {
|
||||
OnDeselected(leEvent);
|
||||
m_pParentView->FireOnListDeselected(leEvent);
|
||||
}
|
||||
} else {
|
||||
if (-1 == GetFirstSelected()) {
|
||||
OnDeselected(leEvent);
|
||||
m_pParentView->FireOnListDeselected(leEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,26 +156,6 @@ void CBOINCListCtrl::OnClick(wxCommandEvent& event) {
|
|||
}
|
||||
|
||||
|
||||
void CBOINCListCtrl::OnSelected(wxListEvent& event) {
|
||||
wxASSERT(NULL != m_pParentView);
|
||||
wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView));
|
||||
|
||||
m_pParentView->FireOnListSelected(event);
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void CBOINCListCtrl::OnDeselected(wxListEvent& event) {
|
||||
wxASSERT(NULL != m_pParentView);
|
||||
wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView));
|
||||
|
||||
m_pParentView->FireOnListDeselected(event);
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
wxString CBOINCListCtrl::OnGetItemText(long item, long column) const {
|
||||
wxASSERT(NULL != m_pParentView);
|
||||
wxASSERT(wxDynamicCast(m_pParentView, CBOINCBaseView));
|
||||
|
|
|
@ -42,8 +42,6 @@ public:
|
|||
private:
|
||||
|
||||
virtual void OnClick(wxCommandEvent& event);
|
||||
virtual void OnSelected(wxListEvent& event);
|
||||
virtual void OnDeselected(wxListEvent& event);
|
||||
|
||||
virtual wxString OnGetItemText(long item, long column) const;
|
||||
virtual int OnGetItemImage(long item) const;
|
||||
|
|
|
@ -44,37 +44,49 @@ CBOINCTaskCtrl::~CBOINCTaskCtrl() {}
|
|||
|
||||
|
||||
|
||||
wxInt32 CBOINCTaskCtrl::CreateTaskControls() {
|
||||
wxInt32 CBOINCTaskCtrl::UpdateControls() {
|
||||
unsigned int i;
|
||||
unsigned int j;
|
||||
wxInt32 iCurrentWidth = 0;
|
||||
wxInt32 iFutureWidth = 0;
|
||||
bool bCreateMainSizer = false;
|
||||
CTaskItemGroup* pGroup = NULL;
|
||||
CTaskItem* pItem = NULL;
|
||||
|
||||
m_pBoxSizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_pBoxSizer->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
|
||||
for (i=0; i < m_pParent->m_TaskGroups.size(); i++) {
|
||||
pGroup = m_pParent->m_TaskGroups[i];
|
||||
|
||||
pGroup->m_pStaticBox = new wxStaticBox(this, wxID_ANY, pGroup->m_strName);
|
||||
pGroup->m_pStaticBoxSizer = new wxStaticBoxSizer(pGroup->m_pStaticBox, wxVERTICAL);
|
||||
|
||||
for (j=0; j < pGroup->m_Tasks.size(); j++) {
|
||||
pItem = pGroup->m_Tasks[j];
|
||||
|
||||
pItem->m_pButton = new wxButton;
|
||||
pItem->m_pButton->Create(this, pItem->m_iEventID, pItem->m_strName, wxDefaultPosition, wxDefaultSize, 0);
|
||||
pItem->m_pButton->SetToolTip(pItem->m_strDescription);
|
||||
pGroup->m_pStaticBoxSizer->Add(pItem->m_pButton, 0, wxEXPAND|wxALL, 5);
|
||||
}
|
||||
|
||||
m_pBoxSizer->Add(pGroup->m_pStaticBoxSizer, 0, wxEXPAND|wxALL, 5);
|
||||
m_pBoxSizer->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
bCreateMainSizer = (!GetSizer());
|
||||
if (bCreateMainSizer) {
|
||||
m_pBoxSizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_pBoxSizer->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
}
|
||||
|
||||
SetSizerAndFit(m_pBoxSizer);
|
||||
// Create static boxes and sizers if they don't exist
|
||||
for (i=0; i < m_pParent->m_TaskGroups.size(); i++) {
|
||||
pGroup = m_pParent->m_TaskGroups[i];
|
||||
if (!pGroup->m_pStaticBox) {
|
||||
pGroup->m_pStaticBox = new wxStaticBox(this, wxID_ANY, pGroup->m_strName);
|
||||
pGroup->m_pStaticBoxSizer = new wxStaticBoxSizer(pGroup->m_pStaticBox, wxVERTICAL);
|
||||
m_pBoxSizer->Add(pGroup->m_pStaticBoxSizer, 0, wxEXPAND|wxALL, 5);
|
||||
m_pBoxSizer->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5);
|
||||
}
|
||||
}
|
||||
|
||||
// Create buttons if they don't exist
|
||||
for (i=0; i < m_pParent->m_TaskGroups.size(); i++) {
|
||||
pGroup = m_pParent->m_TaskGroups[i];
|
||||
for (j=0; j < pGroup->m_Tasks.size(); j++) {
|
||||
pItem = pGroup->m_Tasks[j];
|
||||
if (!pItem->m_pButton) {
|
||||
pItem->m_pButton = new wxButton;
|
||||
pItem->m_pButton->Create(this, pItem->m_iEventID, pItem->m_strName, wxDefaultPosition, wxDefaultSize, 0);
|
||||
pItem->m_pButton->SetToolTip(pItem->m_strDescription);
|
||||
pGroup->m_pStaticBoxSizer->Add(pItem->m_pButton, 0, wxEXPAND|wxALL, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bCreateMainSizer) {
|
||||
SetSizerAndFit(m_pBoxSizer);
|
||||
} else {
|
||||
Fit();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public:
|
|||
|
||||
~CBOINCTaskCtrl();
|
||||
|
||||
wxInt32 CreateTaskControls();
|
||||
wxInt32 UpdateControls();
|
||||
|
||||
virtual bool OnSaveState( wxConfigBase* pConfig );
|
||||
virtual bool OnRestoreState( wxConfigBase* pConfig );
|
||||
|
|
|
@ -46,6 +46,8 @@ IMPLEMENT_DYNAMIC_CLASS(CViewMessages, CBOINCBaseView)
|
|||
BEGIN_EVENT_TABLE (CViewMessages, CBOINCBaseView)
|
||||
EVT_BUTTON(ID_TASK_MESSAGES_COPYALL, CViewMessages::OnMessagesCopyAll)
|
||||
EVT_BUTTON(ID_TASK_MESSAGES_COPYSELECTED, CViewMessages::OnMessagesCopySelected)
|
||||
EVT_LIST_ITEM_SELECTED(ID_LIST_MESSAGESVIEW, CViewMessages::OnListSelected)
|
||||
EVT_LIST_ITEM_DESELECTED(ID_LIST_MESSAGESVIEW, CViewMessages::OnListDeselected)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
|
||||
|
@ -92,7 +94,7 @@ CViewMessages::CViewMessages(wxNotebook* pNotebook) :
|
|||
|
||||
|
||||
// Create Task Pane Items
|
||||
m_pTaskPane->CreateTaskControls();
|
||||
m_pTaskPane->UpdateControls();
|
||||
|
||||
// Create List Pane Items
|
||||
m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 115);
|
||||
|
@ -153,6 +155,9 @@ void CViewMessages::OnMessagesCopyAll( wxCommandEvent& event ) {
|
|||
|
||||
#endif
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewMessages::OnMessagesCopyAll - Function End"));
|
||||
}
|
||||
|
||||
|
@ -186,6 +191,9 @@ void CViewMessages::OnMessagesCopySelected( wxCommandEvent& event ) {
|
|||
|
||||
#endif
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewMessages::OnMessagesCopySelected - Function End"));
|
||||
}
|
||||
|
||||
|
@ -273,10 +281,6 @@ void CViewMessages::UpdateSelection() {
|
|||
}
|
||||
|
||||
|
||||
void CViewMessages::UpdateTaskPane() {
|
||||
}
|
||||
|
||||
|
||||
wxInt32 CViewMessages::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
|
@ -406,4 +410,5 @@ bool CViewMessages::CloseClipboard() {
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
const char *BOINC_RCSID_0be7149475 = "$Id$";
|
||||
|
|
|
@ -60,7 +60,6 @@ protected:
|
|||
virtual bool EnsureLastItemVisible();
|
||||
|
||||
virtual void UpdateSelection();
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
|
||||
wxInt32 FormatPriority( wxInt32 item, wxString& strBuffer ) const;
|
||||
|
|
|
@ -83,6 +83,8 @@ BEGIN_EVENT_TABLE (CViewProjects, CBOINCBaseView)
|
|||
EVT_BUTTON(ID_TASK_PROJECT_RESET, CViewProjects::OnProjectReset)
|
||||
EVT_BUTTON(ID_TASK_PROJECT_DETACH, CViewProjects::OnProjectDetach)
|
||||
EVT_BUTTON(ID_TASK_PROJECT_ATTACH, CViewProjects::OnProjectAttach)
|
||||
EVT_LIST_ITEM_SELECTED(ID_LIST_PROJECTSVIEW, CViewProjects::OnListSelected)
|
||||
EVT_LIST_ITEM_DESELECTED(ID_LIST_PROJECTSVIEW, CViewProjects::OnListDeselected)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
|
||||
|
@ -180,7 +182,7 @@ CViewProjects::CViewProjects(wxNotebook* pNotebook) :
|
|||
|
||||
|
||||
// Create Task Pane Items
|
||||
m_pTaskPane->CreateTaskControls();
|
||||
m_pTaskPane->UpdateControls();
|
||||
|
||||
// Create List Pane Items
|
||||
m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 150);
|
||||
|
@ -226,6 +228,9 @@ void CViewProjects::OnProjectUpdate( wxCommandEvent& event ) {
|
|||
pDoc->ProjectUpdate(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectUpdate - Function End"));
|
||||
}
|
||||
|
||||
|
@ -247,6 +252,9 @@ void CViewProjects::OnProjectSuspend( wxCommandEvent& event ) {
|
|||
pDoc->ProjectSuspend(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectSuspend - Function End"));
|
||||
}
|
||||
|
||||
|
@ -268,6 +276,9 @@ void CViewProjects::OnProjectResume( wxCommandEvent& event ) {
|
|||
pDoc->ProjectResume(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectResume - Function End"));
|
||||
}
|
||||
|
||||
|
@ -289,6 +300,9 @@ void CViewProjects::OnProjectNoNewWork( wxCommandEvent& event ) {
|
|||
pDoc->ProjectNoMoreWork(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectNoNewWork - Function End"));
|
||||
}
|
||||
|
||||
|
@ -310,6 +324,9 @@ void CViewProjects::OnProjectAllowNewWork( wxCommandEvent& event ) {
|
|||
pDoc->ProjectAllowMoreWork(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectAllowNewWork - Function End"));
|
||||
}
|
||||
|
||||
|
@ -351,6 +368,9 @@ void CViewProjects::OnProjectReset( wxCommandEvent& event ) {
|
|||
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectReset - Function End"));
|
||||
}
|
||||
|
||||
|
@ -393,6 +413,9 @@ void CViewProjects::OnProjectDetach( wxCommandEvent& event ) {
|
|||
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectDetach - Function End"));
|
||||
}
|
||||
|
||||
|
@ -430,10 +453,13 @@ void CViewProjects::OnProjectAttach( wxCommandEvent& event ) {
|
|||
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectAttach - Function End"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
wxInt32 CViewProjects::GetDocCount() {
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
|
@ -444,6 +470,28 @@ wxInt32 CViewProjects::GetDocCount() {
|
|||
}
|
||||
|
||||
|
||||
void CViewProjects::OnListSelected(wxListEvent& event) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnListSelected - Function Begin"));
|
||||
|
||||
|
||||
|
||||
UpdateSelection();
|
||||
event.Skip();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnListSelected - Function End"));
|
||||
}
|
||||
|
||||
|
||||
void CViewProjects::OnListDeselected(wxListEvent& event) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnListDeselected - Function Begin"));
|
||||
|
||||
UpdateSelection();
|
||||
event.Skip();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnListDeselected - Function End"));
|
||||
}
|
||||
|
||||
|
||||
wxString CViewProjects::OnListGetItemText(long item, long column) const {
|
||||
CProject* project = m_ProjectCache.at(item);
|
||||
wxString strBuffer = wxEmptyString;
|
||||
|
@ -572,10 +620,10 @@ wxInt32 CViewProjects::UpdateCache(long item, long column, wxString& strNewData)
|
|||
|
||||
|
||||
void CViewProjects::UpdateSelection() {
|
||||
// Update the tasks static box buttons
|
||||
CTaskItemGroup* pGroup = m_TaskGroups[0];
|
||||
|
||||
if (m_pListPane->GetSelectedItemCount() == 0) {
|
||||
pGroup->button(BTN_UPDATE)->Disable;
|
||||
pGroup->button(BTN_UPDATE)->Disable();
|
||||
pGroup->button(BTN_SUSPEND)->Disable();
|
||||
pGroup->button(BTN_NOWORK)->Disable();
|
||||
pGroup->button(BTN_RESET)->Disable();
|
||||
|
@ -607,10 +655,6 @@ void CViewProjects::UpdateSelection() {
|
|||
}
|
||||
}
|
||||
|
||||
void CViewProjects::UpdateTaskPane() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
wxInt32 CViewProjects::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
|
|
@ -71,6 +71,8 @@ protected:
|
|||
|
||||
virtual wxInt32 GetDocCount();
|
||||
|
||||
virtual void OnListSelected( wxListEvent& event );
|
||||
virtual void OnListDeselected( wxListEvent& event );
|
||||
virtual wxString OnListGetItemText( long item, long column ) const;
|
||||
|
||||
virtual wxString OnDocGetItemText( long item, long column ) const;
|
||||
|
@ -82,7 +84,6 @@ protected:
|
|||
virtual wxInt32 UpdateCache( long item, long column, wxString& strNewData );
|
||||
|
||||
virtual void UpdateSelection();
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
|
||||
wxInt32 FormatAccountName( wxInt32 item, wxString& strBuffer ) const;
|
||||
|
|
|
@ -52,6 +52,8 @@ CResource::~CResource() {
|
|||
IMPLEMENT_DYNAMIC_CLASS(CViewResources, CBOINCBaseView)
|
||||
|
||||
BEGIN_EVENT_TABLE (CViewResources, CBOINCBaseView)
|
||||
EVT_LIST_ITEM_SELECTED(ID_LIST_RESOURCEUTILIZATIONVIEW, CViewResources::OnListSelected)
|
||||
EVT_LIST_ITEM_DESELECTED(ID_LIST_RESOURCEUTILIZATIONVIEW, CViewResources::OnListDeselected)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
|
||||
|
@ -72,7 +74,7 @@ CViewResources::CViewResources(wxNotebook* pNotebook) :
|
|||
//
|
||||
|
||||
// Create Task Pane Items
|
||||
m_pTaskPane->CreateTaskControls();
|
||||
m_pTaskPane->UpdateControls();
|
||||
|
||||
// Create List Pane Items
|
||||
m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, -1);
|
||||
|
@ -192,10 +194,6 @@ void CViewResources::UpdateSelection() {
|
|||
}
|
||||
|
||||
|
||||
void CViewResources::UpdateTaskPane() {
|
||||
}
|
||||
|
||||
|
||||
wxInt32 CViewResources::FormatProjectName(wxInt32 item, wxString& strBuffer) const
|
||||
{
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
|
|
@ -68,7 +68,6 @@ protected:
|
|||
virtual wxInt32 UpdateCache( long item, long column, wxString& strNewData );
|
||||
|
||||
virtual void UpdateSelection();
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
|
||||
wxInt32 FormatDiskSpace( wxInt32 item, wxString& strBuffer ) const;
|
||||
|
|
|
@ -265,6 +265,8 @@ BEGIN_EVENT_TABLE (CViewStatistics, CBOINCBaseView)
|
|||
EVT_BUTTON(ID_TASK_STATISTICS_USERAVERAGE, CViewStatistics::OnStatisticsUserAverage)
|
||||
EVT_BUTTON(ID_TASK_STATISTICS_HOSTTOTAL, CViewStatistics::OnStatisticsHostTotal)
|
||||
EVT_BUTTON(ID_TASK_STATISTICS_HOSTAVERAGE, CViewStatistics::OnStatisticsHostAverage)
|
||||
EVT_LIST_ITEM_SELECTED(ID_LIST_STATISTICSVIEW, CViewStatistics::OnListSelected)
|
||||
EVT_LIST_ITEM_DESELECTED(ID_LIST_STATISTICSVIEW, CViewStatistics::OnListDeselected)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
|
||||
|
@ -331,7 +333,7 @@ CViewStatistics::CViewStatistics(wxNotebook* pNotebook) :
|
|||
|
||||
|
||||
// Create Task Pane Items
|
||||
m_pTaskPane->CreateTaskControls();
|
||||
m_pTaskPane->UpdateControls();
|
||||
}
|
||||
|
||||
CViewStatistics::~CViewStatistics() {
|
||||
|
@ -358,6 +360,9 @@ void CViewStatistics::OnStatisticsUserTotal( wxCommandEvent& event ) {
|
|||
m_PaintStatistics->Refresh();
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewStatistics::OnStatisticsUserTotal - Function End"));
|
||||
}
|
||||
|
||||
|
@ -376,6 +381,9 @@ void CViewStatistics::OnStatisticsUserAverage( wxCommandEvent& event ) {
|
|||
m_PaintStatistics->Refresh();
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewStatistics::OnStatisticsUserAverage - Function End"));
|
||||
}
|
||||
|
||||
|
@ -394,6 +402,9 @@ void CViewStatistics::OnStatisticsHostTotal( wxCommandEvent& event ) {
|
|||
m_PaintStatistics->Refresh();
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewStatistics::OnStatisticsHostTotal - Function End"));
|
||||
}
|
||||
|
||||
|
@ -412,6 +423,9 @@ void CViewStatistics::OnStatisticsHostAverage( wxCommandEvent& event ) {
|
|||
m_PaintStatistics->Refresh();
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewStatistics::OnStatisticsHostAverage - Function End"));
|
||||
}
|
||||
|
||||
|
@ -458,5 +472,4 @@ void CViewStatistics::UpdateSelection() {
|
|||
}
|
||||
|
||||
|
||||
void CViewStatistics::UpdateTaskPane() {
|
||||
}
|
||||
const char *BOINC_RCSID_7aadb93333 = "$Id$";
|
||||
|
|
|
@ -70,7 +70,6 @@ protected:
|
|||
virtual void OnListRender( wxTimerEvent& event );
|
||||
|
||||
virtual void UpdateSelection();
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
|
|
@ -70,6 +70,8 @@ IMPLEMENT_DYNAMIC_CLASS(CViewTransfers, CBOINCBaseView)
|
|||
BEGIN_EVENT_TABLE (CViewTransfers, CBOINCBaseView)
|
||||
EVT_BUTTON(ID_TASK_TRANSFERS_RETRYNOW, CViewTransfers::OnTransfersRetryNow)
|
||||
EVT_BUTTON(ID_TASK_TRANSFERS_ABORT, CViewTransfers::OnTransfersAbort)
|
||||
EVT_LIST_ITEM_SELECTED(ID_LIST_TRANSFERSVIEW, CViewTransfers::OnListSelected)
|
||||
EVT_LIST_ITEM_DESELECTED(ID_LIST_TRANSFERSVIEW, CViewTransfers::OnListDeselected)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
|
||||
|
@ -109,7 +111,7 @@ CViewTransfers::CViewTransfers(wxNotebook* pNotebook) :
|
|||
|
||||
|
||||
// Create Task Pane Items
|
||||
m_pTaskPane->CreateTaskControls();
|
||||
m_pTaskPane->UpdateControls();
|
||||
|
||||
// Create List Pane Items
|
||||
m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 125);
|
||||
|
@ -155,6 +157,9 @@ void CViewTransfers::OnTransfersRetryNow( wxCommandEvent& event ) {
|
|||
pDoc->TransferRetryNow(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewTransfers::OnTransfersRetryNow - Function End"));
|
||||
}
|
||||
|
||||
|
@ -197,6 +202,9 @@ void CViewTransfers::OnTransfersAbort( wxCommandEvent& event ) {
|
|||
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewTransfers::OnTransfersAbort - Function End"));
|
||||
}
|
||||
|
||||
|
@ -342,10 +350,6 @@ void CViewTransfers::UpdateSelection() {
|
|||
}
|
||||
|
||||
|
||||
void CViewTransfers::UpdateTaskPane() {
|
||||
}
|
||||
|
||||
|
||||
wxInt32 CViewTransfers::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
|
|
|
@ -76,7 +76,6 @@ protected:
|
|||
virtual wxInt32 UpdateCache( long item, long column, wxString& strNewData );
|
||||
|
||||
virtual void UpdateSelection();
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
|
||||
wxInt32 FormatFileName( wxInt32 item, wxString& strBuffer ) const;
|
||||
|
|
|
@ -74,6 +74,8 @@ BEGIN_EVENT_TABLE (CViewWork, CBOINCBaseView)
|
|||
EVT_BUTTON(ID_TASK_WORK_RESUME, CViewWork::OnWorkResume)
|
||||
EVT_BUTTON(ID_TASK_WORK_SHOWGRAPHICS, CViewWork::OnWorkShowGraphics)
|
||||
EVT_BUTTON(ID_TASK_WORK_ABORT, CViewWork::OnWorkAbort)
|
||||
EVT_LIST_ITEM_SELECTED(ID_LIST_WORKVIEW, CViewWork::OnListSelected)
|
||||
EVT_LIST_ITEM_DESELECTED(ID_LIST_WORKVIEW, CViewWork::OnListDeselected)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
|
||||
|
@ -127,7 +129,7 @@ CViewWork::CViewWork(wxNotebook* pNotebook) :
|
|||
|
||||
|
||||
// Create Task Pane Items
|
||||
m_pTaskPane->CreateTaskControls();
|
||||
m_pTaskPane->UpdateControls();
|
||||
|
||||
// Create List Pane Items
|
||||
m_pListPane->InsertColumn(COLUMN_PROJECT, _("Project"), wxLIST_FORMAT_LEFT, 125);
|
||||
|
@ -174,6 +176,9 @@ void CViewWork::OnWorkSuspend( wxCommandEvent& event ) {
|
|||
pDoc->WorkSuspend(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnWorkSuspend - Function End"));
|
||||
}
|
||||
|
||||
|
@ -195,6 +200,9 @@ void CViewWork::OnWorkResume( wxCommandEvent& event ) {
|
|||
pDoc->WorkResume(m_pListPane->GetFirstSelected());
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnWorkResume - Function End"));
|
||||
}
|
||||
|
||||
|
@ -245,6 +253,9 @@ void CViewWork::OnWorkShowGraphics( wxCommandEvent& event ) {
|
|||
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnWorkShowGraphics - Function End"));
|
||||
}
|
||||
|
||||
|
@ -285,6 +296,9 @@ void CViewWork::OnWorkAbort( wxCommandEvent& event ) {
|
|||
|
||||
pFrame->UpdateStatusText(wxT(""));
|
||||
|
||||
UpdateSelection();
|
||||
pFrame->ProcessRefreshView();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnWorkAbort - Function End"));
|
||||
}
|
||||
|
||||
|
@ -439,10 +453,6 @@ void CViewWork::UpdateSelection() {
|
|||
}
|
||||
|
||||
|
||||
void CViewWork::UpdateTaskPane() {
|
||||
}
|
||||
|
||||
|
||||
wxInt32 CViewWork::FormatProjectName(wxInt32 item, wxString& strBuffer) const {
|
||||
CMainDocument* pDoc = wxGetApp().GetDocument();
|
||||
|
||||
|
|
|
@ -79,7 +79,6 @@ protected:
|
|||
virtual wxInt32 UpdateCache( long item, long column, wxString& strNewData );
|
||||
|
||||
virtual void UpdateSelection();
|
||||
virtual void UpdateTaskPane();
|
||||
|
||||
wxInt32 FormatProjectName( wxInt32 item, wxString& strBuffer ) const;
|
||||
wxInt32 FormatApplicationName( wxInt32 item, wxString& strBuffer ) const;
|
||||
|
|
Loading…
Reference in New Issue