- Bug Fix: fprintf is an ANSI function in Linux, convert Unicode

string to ANSI before writing them to sdterr.
    - Bug Fix: Fix the abort button logic, VS 2005 was throwing some
        useful warnings.
        
    clientgui/
        SkinManager.cpp
        ViewWork.cpp
        ViewWorkGrid.cpp

svn path=/trunk/boinc/; revision=12700
This commit is contained in:
Rom Walton 2007-05-21 14:20:09 +00:00
parent 2ed9d12ddc
commit b7de981d3b
4 changed files with 25 additions and 15 deletions

View File

@ -5083,3 +5083,13 @@ Janus 20 May 2007
html/bt/inc/
blist.php
Rom 21 May 2007
- Bug Fix: fprintf is an ANSI function in Linux, convert Unicode
string to ANSI before writing them to sdterr.
- Bug Fix: Fix the abort button logic, VS 2005 was throwing some
useful warnings.
clientgui/
SkinManager.cpp
ViewWork.cpp
ViewWorkGrid.cpp

View File

@ -186,7 +186,7 @@ bool CSkinImage::Validate() {
m_bmpBitmap = wxBitmap(wxImage(m_strDesiredBitmap, wxBITMAP_TYPE_ANY));
}
if (!m_bmpBitmap.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' image. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' image. Using default.\n", m_strComponentName.mb_str());
m_bmpBitmap = wxBitmap(m_ppDefaultBitmap);
wxASSERT(m_bmpBitmap.Ok());
}
@ -196,7 +196,7 @@ bool CSkinImage::Validate() {
m_colBackgroundColor = ParseColor(m_strDesiredBackgroundColor);
}
if (!m_colBackgroundColor.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' background color. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' background color. Using default.\n", m_strComponentName.mb_str());
m_colBackgroundColor = ParseColor(m_strDefaultBackgroundColor);
wxASSERT(m_colBackgroundColor.Ok());
}
@ -276,7 +276,7 @@ bool CSkinIcon::Validate() {
m_icoIcon.CopyFromBitmap(bmp);
}
if (!m_icoIcon.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' icon. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' icon. Using default.\n", m_strComponentName.mb_str());
m_icoIcon = wxIcon(m_ppDefaultIcon);
wxASSERT(m_icoIcon.Ok());
}
@ -362,7 +362,7 @@ bool CSkinSimpleButton::Validate() {
m_bmpBitmap = wxBitmap(wxImage(m_strDesiredBitmap, wxBITMAP_TYPE_ANY));
}
if (!m_bmpBitmap.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' image. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' image. Using default.\n", m_strComponentName.mb_str());
m_bmpBitmap = wxBitmap(m_ppDefaultBitmap);
wxASSERT(m_bmpBitmap.Ok());
}
@ -372,7 +372,7 @@ bool CSkinSimpleButton::Validate() {
m_bmpBitmapClicked = wxBitmap(wxImage(m_strDesiredBitmapClicked, wxBITMAP_TYPE_ANY));
}
if (!m_bmpBitmapClicked.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' clicked image. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' clicked image. Using default.\n", m_strComponentName.mb_str());
m_bmpBitmapClicked = wxBitmap(m_ppDefaultBitmapClicked);
wxASSERT(m_bmpBitmapClicked.Ok());
}
@ -487,7 +487,7 @@ bool CSkinSimpleTab::Validate() {
m_bmpBitmap = wxBitmap(wxImage(m_strDesiredBitmap, wxBITMAP_TYPE_ANY));
}
if (!m_bmpBitmap.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' tab image. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' tab image. Using default.\n", m_strComponentName.mb_str());
m_bmpBitmap = wxBitmap(m_ppDefaultBitmap);
wxASSERT(m_bmpBitmap.Ok());
}
@ -497,7 +497,7 @@ bool CSkinSimpleTab::Validate() {
m_colBorderColor = ParseColor(m_strDesiredBorderColor);
}
if (!m_colBorderColor.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' tab border color. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' tab border color. Using default.\n", m_strComponentName.mb_str());
m_colBorderColor = ParseColor(m_strDefaultBorderColor);
wxASSERT(m_colBorderColor.Ok());
}
@ -507,7 +507,7 @@ bool CSkinSimpleTab::Validate() {
m_colGradientFromColor = ParseColor(m_strDesiredGradientFromColor);
}
if (!m_colGradientFromColor.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' tab gradient from color. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' tab gradient from color. Using default.\n", m_strComponentName.mb_str());
m_colGradientFromColor = ParseColor(m_strDefaultGradientFromColor);
wxASSERT(m_colGradientFromColor.Ok());
}
@ -517,7 +517,7 @@ bool CSkinSimpleTab::Validate() {
m_colGradientToColor = ParseColor(m_strDesiredGradientToColor);
}
if (!m_colGradientToColor.Ok()) {
fprintf(stderr, "Skin Manager: Failed to load '%s' tab gradient to color. Using default.\n", m_strComponentName.c_str());
fprintf(stderr, "Skin Manager: Failed to load '%s' tab gradient to color. Using default.\n", m_strComponentName.mb_str());
m_colGradientToColor = ParseColor(m_strDefaultGradientToColor);
wxASSERT(m_colGradientToColor.Ok());
}

View File

@ -520,9 +520,9 @@ void CViewWork::UpdateSelection() {
}
if (
!result->active_task_state == PROCESS_ABORT_PENDING &&
!result->active_task_state == PROCESS_ABORTED &&
!result->state == RESULT_ABORTED
result->active_task_state != PROCESS_ABORT_PENDING &&
result->active_task_state != PROCESS_ABORTED &&
result->state != RESULT_ABORTED
) {
m_pTaskPane->EnableTask(pGroup->m_Tasks[BTN_ABORT]);
} else {

View File

@ -391,9 +391,9 @@ void CViewWorkGrid::UpdateSelection() {
}
if (
!result->active_task_state == PROCESS_ABORT_PENDING &&
!result->active_task_state == PROCESS_ABORTED &&
!result->state == RESULT_ABORTED
result->active_task_state != PROCESS_ABORT_PENDING &&
result->active_task_state != PROCESS_ABORTED &&
result->state != RESULT_ABORTED
) {
m_pTaskPane->EnableTask(pGroup->m_Tasks[BTN_ABORT]);
} else {