mirror of https://github.com/BOINC/boinc.git
- Manager: in grid views, don't sort unless needed (from Frank)
- client: show OS name/version in message at startup svn path=/trunk/boinc/; revision=13161
This commit is contained in:
parent
260f3bf026
commit
0a7422f5f7
|
@ -7272,22 +7272,32 @@ David 14 July 2007
|
|||
sample_index.php
|
||||
|
||||
David 14 July 2007
|
||||
- client: print time zone message at startup
|
||||
- Manager: removed ForceRefresh() calls in grid views;
|
||||
reduces CPU usage, still seems to work (from Frank Weiler)
|
||||
- client: print time zone message at startup
|
||||
- Manager: removed ForceRefresh() calls in grid views;
|
||||
reduces CPU usage, still seems to work (from Frank Weiler)
|
||||
Fixes #291.
|
||||
|
||||
client/
|
||||
client_state.C
|
||||
cpu_sched.C
|
||||
clientgui/
|
||||
ViewMessagesGrid.cpp
|
||||
ViewProjectsGrid.cpp
|
||||
ViewTransfersGrid.cpp
|
||||
ViewWorkGrid.cpp
|
||||
client/
|
||||
client_state.C
|
||||
cpu_sched.C
|
||||
clientgui/
|
||||
ViewMessagesGrid.cpp
|
||||
ViewProjectsGrid.cpp
|
||||
ViewTransfersGrid.cpp
|
||||
ViewWorkGrid.cpp
|
||||
|
||||
Charlie 16 July 2007
|
||||
- Mac client: always show UNIX error if state file rename fails.
|
||||
|
||||
client/
|
||||
cs_statefile.C
|
||||
|
||||
David 16 July 2007
|
||||
- Manager: in grid views, don't sort unless needed (from Frank)
|
||||
- client: show OS name/version in message at startup
|
||||
|
||||
client/
|
||||
client_state.C
|
||||
clientgui/
|
||||
BOINCGridCtrl.cpp,h
|
||||
ViewWorkGrid.cpp
|
||||
|
|
|
@ -131,6 +131,9 @@ void CLIENT_STATE::show_host_info() {
|
|||
msg_printf(NULL, MSG_INFO,
|
||||
"Processor features: %s", host_info.p_features
|
||||
);
|
||||
msg_printf(NULL, MSG_INFO,
|
||||
"OS: %s: %s", host_info.os_name, host_info.os_version
|
||||
);
|
||||
|
||||
nbytes_to_string(host_info.m_nbytes, 0, buf, sizeof(buf));
|
||||
nbytes_to_string(host_info.m_swap, 0, buf2, sizeof(buf2));
|
||||
|
|
|
@ -129,6 +129,7 @@ CBOINCGridCtrl::CBOINCGridCtrl(wxWindow* parent, wxWindowID iGridWindowID) : wxG
|
|||
//init members
|
||||
sortColumn=-1;
|
||||
sortAscending=true;
|
||||
sortNeededByLabelClick=false;
|
||||
m_pkColumnIndex=-1;
|
||||
m_cursorcol=-1;
|
||||
m_cursorrow=-1;
|
||||
|
@ -556,7 +557,8 @@ void CBOINCGridCtrl::OnLabelLClick(wxGridEvent& ev) {
|
|||
|
||||
// Force a repaint of the label
|
||||
SetColLabelValue(ev.GetCol(), GetColLabelValue(ev.GetCol()));
|
||||
|
||||
//
|
||||
sortNeededByLabelClick=true;
|
||||
// Update and sort data
|
||||
wxTimerEvent tEvent;
|
||||
wxDynamicCast(GetParent(),CBOINCBaseView)->FireOnListRender(tEvent);
|
||||
|
@ -567,6 +569,7 @@ void CBOINCGridCtrl::OnLabelLClick(wxGridEvent& ev) {
|
|||
|
||||
void CBOINCGridCtrl::SortData() {
|
||||
GetTable()->SortData(sortColumn,sortAscending);
|
||||
sortNeededByLabelClick=false;
|
||||
}
|
||||
|
||||
void CBOINCGridCtrl::SetColumnSortType(int col,int sortType/*=CST_STRING*/) {
|
||||
|
|
|
@ -107,6 +107,7 @@ public:
|
|||
void Setup();
|
||||
int sortColumn;
|
||||
bool sortAscending;
|
||||
bool sortNeededByLabelClick;
|
||||
protected:
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
|
|
@ -814,17 +814,26 @@ void CViewWorkGrid::OnListRender( wxTimerEvent& WXUNUSED(event) ) {
|
|||
return;
|
||||
}
|
||||
|
||||
// flag for row count changes
|
||||
bool rowCountChanged=false;
|
||||
// Right-size the grid so that the number of rows matches
|
||||
// the document state.
|
||||
if(GetDocCount() != m_pGridPane->GetNumberRows()) {
|
||||
if (GetDocCount() > m_pGridPane->GetNumberRows()) {
|
||||
m_pGridPane->AppendRows(GetDocCount() - m_pGridPane->GetNumberRows());
|
||||
rowCountChanged=true;
|
||||
} else {
|
||||
m_pGridPane->DeleteRows(0, m_pGridPane->GetNumberRows() - GetDocCount());
|
||||
rowCountChanged=true;
|
||||
}
|
||||
wxASSERT(GetDocCount() == m_pGridPane->GetNumberRows());
|
||||
}
|
||||
|
||||
//init array to detect cell value changes
|
||||
wxArrayInt arrColumnDataChanged;
|
||||
for(int i=0; i<= COLUMN_STATUS;i++) {
|
||||
arrColumnDataChanged.Add(0);
|
||||
}
|
||||
//update cell values
|
||||
wxString strBuffer;
|
||||
int iMax = m_pGridPane->GetNumberRows();
|
||||
|
@ -833,48 +842,65 @@ void CViewWorkGrid::OnListRender( wxTimerEvent& WXUNUSED(event) ) {
|
|||
FormatProjectName(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_PROJECT) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_PROJECT, strBuffer);
|
||||
arrColumnDataChanged[COLUMN_PROJECT]=1;
|
||||
}
|
||||
|
||||
FormatApplicationName(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_APPLICATION) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_APPLICATION, strBuffer);
|
||||
arrColumnDataChanged[COLUMN_APPLICATION]=1;
|
||||
}
|
||||
|
||||
FormatName(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_NAME) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_NAME, strBuffer);
|
||||
arrColumnDataChanged[COLUMN_NAME]=1;
|
||||
}
|
||||
|
||||
FormatCPUTime(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_CPUTIME) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_CPUTIME, strBuffer);
|
||||
arrColumnDataChanged[COLUMN_CPUTIME]=1;
|
||||
}
|
||||
|
||||
FormatProgress(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_PROGRESS) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_PROGRESS, strBuffer);
|
||||
m_pGridPane->SetCellAlignment(iRow, COLUMN_PROGRESS, wxALIGN_CENTRE, wxALIGN_CENTRE);
|
||||
arrColumnDataChanged[COLUMN_PROGRESS]=1;
|
||||
}
|
||||
|
||||
FormatTimeToCompletion(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_TOCOMPLETION) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_TOCOMPLETION, strBuffer);
|
||||
arrColumnDataChanged[COLUMN_TOCOMPLETION]=1;
|
||||
}
|
||||
|
||||
FormatReportDeadline(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_REPORTDEADLINE) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_REPORTDEADLINE, strBuffer);
|
||||
arrColumnDataChanged[COLUMN_REPORTDEADLINE]=1;
|
||||
}
|
||||
|
||||
strBuffer = wxEmptyString;
|
||||
FormatStatus(iRow, strBuffer);
|
||||
if (m_pGridPane->GetCellValue(iRow, COLUMN_STATUS) != strBuffer) {
|
||||
m_pGridPane->SetCellValue(iRow, COLUMN_STATUS, strBuffer);
|
||||
arrColumnDataChanged[COLUMN_STATUS]=1;
|
||||
}
|
||||
}
|
||||
|
||||
m_pGridPane->SortData();
|
||||
|
||||
//sort only
|
||||
//1. if row count changed
|
||||
//2. if sorting column has cell value changes
|
||||
//3. if sort is enforced by user through label click
|
||||
if( rowCountChanged ||
|
||||
(arrColumnDataChanged[m_pGridPane->sortColumn]==1) ||
|
||||
m_pGridPane->sortNeededByLabelClick)
|
||||
{
|
||||
m_pGridPane->SortData();
|
||||
}
|
||||
UpdateSelection();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue