Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv27056/wxLua/modules/wxluadebug/src
Modified Files:
wxlstack.cpp
Log Message:
Snip long string values for listctrl in stack dialog and replace \r\n with \\r\\n strings
Index: wxlstack.cpp
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxlstack.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** wxlstack.cpp 16 Jun 2007 06:21:47 -0000 1.6
--- wxlstack.cpp 16 Jun 2007 06:39:45 -0000 1.7
***************
*** 464,468 ****
m_listCtrl->SetItem(lc_item, 1, wxString::Format(wxT("%d:%d"), level+1, n+1));
m_listCtrl->SetItem(lc_item, 2, item->GetType());
! m_listCtrl->SetItem(lc_item, 3, item->GetValue());
}
--- 464,474 ----
m_listCtrl->SetItem(lc_item, 1, wxString::Format(wxT("%d:%d"), level+1, n+1));
m_listCtrl->SetItem(lc_item, 2, item->GetType());
!
! // generic listctrl doesn't like showing huge strings, nor \n
! wxString value(item->GetValue());
! if (value.Length() > 200) value = value.Mid(0, 200) + wxT("... <snip>");
! value.Replace(wxT("\n"), wxT("\\n"));
! value.Replace(wxT("\r"), wxT("\\r"));
! m_listCtrl->SetItem(lc_item, 3, value);
}
|