*** empty log message ***

svn path=/trunk/boinc/; revision=11854
This commit is contained in:
Rom Walton 2007-01-13 21:08:50 +00:00
parent 84251a5645
commit c1ec259d10
4 changed files with 17 additions and 10 deletions

View File

@ -517,3 +517,16 @@ David 12 Jan 2007
clientgui/ clientgui/
ViewWork.cpp ViewWork.cpp
ViewWorkGrid.cpp ViewWorkGrid.cpp
Rom 13 Jan 2007
- MGR: Streamline the message dialog sync operation a little bit.
- MGR: Fix crashing issue do to invalid type casts, wxWidgets implements
its own form of type casts for C++ objects which probably uses
the basic RTTI of the compiler at some level, but it also has a few
checks and balences as well. So if you get a hankering of using
dynamic_cast or static_cast use wxDynamicCast and wxStaticCast
instead.
clientgui/
sg_DlgMessages.cpp
BOINCGridCtrl.cpp

View File

@ -683,7 +683,8 @@ void CBOINCGridCellRenderer::DoNormalTextDrawing(wxGrid& grid, wxGridCellAttr& a
SetTextColoursAndFont(grid, attr, dc, isSelected); SetTextColoursAndFont(grid, attr, dc, isSelected);
//get a real grid class pointer //get a real grid class pointer
CBOINCGridCtrl* bgrid = dynamic_cast<CBOINCGridCtrl*> (&grid); CBOINCGridCtrl* bgrid = wxDynamicCast(&grid, CBOINCGridCtrl);
//use the overloaded method here //use the overloaded method here
bgrid->DrawTextRectangle(dc, grid.GetCellValue(row, col), bgrid->DrawTextRectangle(dc, grid.GetCellValue(row, col),
rect, hAlign, vAlign); rect, hAlign, vAlign);
@ -867,5 +868,5 @@ int CBOINCGridTable::FindRowIndexByColValue(int col,wxString& value) {
/* for convinience purposes only */ /* for convinience purposes only */
CBOINCGridTable* CBOINCGridCtrl::GetTable() { CBOINCGridTable* CBOINCGridCtrl::GetTable() {
return dynamic_cast<CBOINCGridTable*>(wxGrid::GetTable()); return wxDynamicCast(wxGrid::GetTable(), CBOINCGridTable);
} }

View File

@ -347,7 +347,7 @@ void CPanelMessages::OnRefresh(wxTimerEvent& event) {
wxASSERT(m_pList); wxASSERT(m_pList);
wxInt32 iDocCount = GetDocCount(); wxInt32 iDocCount = wxGetApp().GetDocument()->GetMessageCount();
if (0 >= iDocCount) { if (0 >= iDocCount) {
m_pList->DeleteAllItems(); m_pList->DeleteAllItems();
} else { } else {
@ -531,11 +531,6 @@ bool CPanelMessages::OnRestoreState(wxConfigBase* pConfig) {
} }
wxInt32 CPanelMessages::GetDocCount() {
return wxGetApp().GetDocument()->GetMessageCount();
}
wxString CPanelMessages::OnListGetItemText(long item, long column) const { wxString CPanelMessages::OnListGetItemText(long item, long column) const {
wxString strBuffer = wxEmptyString; wxString strBuffer = wxEmptyString;

View File

@ -146,8 +146,6 @@ private:
wxInt32 CopyToClipboard( wxInt32 item ); wxInt32 CopyToClipboard( wxInt32 item );
bool CloseClipboard(); bool CloseClipboard();
#endif #endif
wxInt32 GetDocCount();
}; };