In Simple View project descriptions, change all occurrences of "<sup>n</sup>" to "^n"

svn path=/trunk/boinc/; revision=24663
This commit is contained in:
Charlie Fenton 2011-11-29 14:42:14 +00:00
parent 85aef1bd15
commit 5304d9c96a
2 changed files with 9 additions and 3 deletions

View File

@ -8719,7 +8719,8 @@ David 28 Nov 2011
Charlie 29 Nov 2011
- MGR: Continue work on Simple View to display the description if
task has no slide show.
task has no slide show.
Change all occurrences of "<sup>n</sup>" to "^n"
clientgui/
sg_TaskPanel.cpp,.h

View File

@ -72,6 +72,7 @@ CScrolledTextBox::~CScrolledTextBox() {
void CScrolledTextBox::SetValue(const wxString& s) {
int lineHeight, visibleHeight, totalLines, visibleLines;
wxString t = s;
Fit();
if (!m_iAvailableWidth) {
@ -81,7 +82,11 @@ void CScrolledTextBox::SetValue(const wxString& s) {
m_TextSizer->Clear(true);
lineHeight = Wrap(s, m_iAvailableWidth, &totalLines);
// Change all occurrences of "<sup>n</sup>" to "^n"
t.Replace(wxT("<sup>"), wxT("^"), true);
t.Replace(wxT("</sup>"), wxT(""), true);
lineHeight = Wrap(t, m_iAvailableWidth, &totalLines);
visibleLines = visibleHeight / lineHeight;
Enable();
@ -278,7 +283,7 @@ numSlides = 0;
m_institution->SetLabel(wxT("University of Washington"));
m_scienceArea->SetLabel(wxT("Biology"));
m_description->SetValue(wxT("Determine the 3-dimensional shapes of proteins in research that may ultimately lead to finding cures for some major human diseases. By running Rosetta@home you will help us speed up and extend our research in ways we couldn't possibly attempt without your help. You will also be helping our efforts at designing new proteins to fight diseases such as HIV, Malaria, Cancer, and Alzheimers Determine the 3-dimensional shapes of proteins in research that may ultimately lead to finding cures for some major human diseases. By running Rosetta@home you will help us speed up and extend our research in ways we couldn't possibly attempt without your help. You will also be helping our efforts at designing new proteins to fight diseases such as HIV, Malaria, Cancer, and Alzheimers"));
m_description->SetValue(wxT("Determine the 3-dimensional shapes of proteins in research that may ultimately lead to finding cures for some major human diseases. Two to the nth power is 2<sup>n</sup>. By running Rosetta@home you will help us speed up and extend our research in ways we couldn't possibly attempt without your help. You will also be helping our efforts at designing new proteins to fight diseases such as HIV, Malaria, Cancer, and Alzheimers Determine the 3-dimensional shapes of proteins in research that may ultimately lead to finding cures for some major human diseases. By running Rosetta@home you will help us speed up and extend our research in ways we couldn't possibly attempt without your help. You will also be helping our efforts at designing new proteins to fight diseases such as HIV, Malaria, Cancer, and Alzheimers"));
m_institution->Show(true);
m_scienceArea->Show(true);
m_description->Show(true);