X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8636aed89614be928547793f91cea7ca54a0d9a8..26b833297883b4cbfdc9fd09d9882efe16f13f97:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 36d171b2cc..1855e79d9e 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -436,7 +436,7 @@ void wxListLineData::SetPosition( wxDC *dc, int x, int y, int window_width ) wxListItemData *item = (wxListItemData*)node->Data(); wxString s; item->GetText( s ); - if (s.IsEmpty()) s = _T("H"); + if (s.IsEmpty()) s = wxT("H"); long lw,lh; dc->GetTextExtent( s, &lw, &lh ); m_bound_label.width = lw; @@ -1209,7 +1209,7 @@ void wxListMainWindow::DeleteLine( wxListLineData *line ) void wxListMainWindow::EditLabel( long item ) { wxNode *node = m_lines.Nth( item ); - wxCHECK_RET( node, _T("wrong index in wxListCtrl::Edit()") ); + wxCHECK_RET( node, wxT("wrong index in wxListCtrl::Edit()") ); m_currentEdit = (wxListLineData*) node->Data(); @@ -1247,7 +1247,7 @@ void wxListMainWindow::EditLabel( long item ) void wxListMainWindow::OnRenameTimer() { - wxCHECK_RET( m_current, _T("invalid m_current") ); + wxCHECK_RET( m_current, wxT("invalid m_current") ); Edit( m_lines.IndexOf( m_current ) ); } @@ -1455,15 +1455,15 @@ void wxListMainWindow::MoveToFocus() { int y_s = m_yScroll*GetScrollPos( wxVERTICAL ); if ((y > y_s) && (y+h < y_s+h_p)) return; - if (y-y_s < 5) { Scroll( -1, (y-5-h_p/2)/m_yScroll ); Refresh(); } - if (y+h+5 > y_s+h_p) { Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll); Refresh(); } + if (y-y_s < 5) { Scroll( -1, (y-5-h_p/2)/m_yScroll ); } + if (y+h+5 > y_s+h_p) { Scroll( -1, (y+h-h_p/2+h+15)/m_yScroll); } } else { int x_s = m_xScroll*GetScrollPos( wxHORIZONTAL ); if ((x > x_s) && (x+w < x_s+w_p)) return; - if (x-x_s < 5) { Scroll( (x-5)/m_xScroll, -1 ); Refresh(); } - if (x+w-5 > x_s+w_p) { Scroll( (x+w-w_p+15)/m_xScroll, -1 ); Refresh(); } + if (x-x_s < 5) { Scroll( (x-5)/m_xScroll, -1 ); } + if (x+w-5 > x_s+w_p) { Scroll( (x+w-w_p+15)/m_xScroll, -1 ); } } } @@ -2251,7 +2251,7 @@ void wxListMainWindow::DeleteItem( long index ) void wxListMainWindow::DeleteColumn( int col ) { wxCHECK_RET( col < (int)m_columns.GetCount(), - _T("attempting to delete inexistent column in wxListView") ); + wxT("attempting to delete inexistent column in wxListView") ); m_dirty = TRUE; wxNode *node = m_columns.Nth( col ); @@ -2876,7 +2876,7 @@ long wxListCtrl::HitTest( const wxPoint &point, int &flags ) long wxListCtrl::InsertItem( wxListItem& info ) { m_mainWin->InsertItem( info ); - return 0; + return info.m_itemId; } long wxListCtrl::InsertItem( long index, const wxString &label )