Skip to content

Commit

Permalink
Merge branch 'client_release/7/7.6' of https://github.com/BOINC/boinc
Browse files Browse the repository at this point in the history
…into client_release/7/7.6
  • Loading branch information
romw committed Aug 27, 2015
2 parents b9a3963 + 29759eb commit 85a33b9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions clientgui/sg_DlgPreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ CPanelPreferences::~CPanelPreferences( )
bool CPanelPreferences::Create()
{
m_backgroundBitmap = NULL;
lastErrorCtrl = NULL;
stdTextBkgdColor = *wxWHITE;

CreateControls();

Expand Down Expand Up @@ -846,6 +848,16 @@ void CPanelPreferences::ShowErrorMessage(wxString& message,wxTextCtrl* errorCtrl
if(message.IsEmpty()){
message = _("invalid input value detected");
}
if (lastErrorCtrl) {
lastErrorCtrl->SetBackgroundColour(stdTextBkgdColor);
lastErrorCtrl->Refresh();
}
if (lastErrorCtrl != errorCtrl) {
stdTextBkgdColor = errorCtrl->GetBackgroundColour();
}
errorCtrl->SetBackgroundColour(wxColour(255, 192, 192));
errorCtrl->Refresh();
lastErrorCtrl = errorCtrl;
wxGetApp().SafeMessageBox(message,_("Validation Error"),wxOK | wxCENTRE | wxICON_ERROR,this);
errorCtrl->SetFocus();
}
Expand Down
3 changes: 3 additions & 0 deletions clientgui/sg_DlgPreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ class CPanelPreferences: public wxPanel
wxBitmap* m_backgroundBitmap;

bool m_bOKToShow;

wxColour stdTextBkgdColor;
wxTextCtrl* lastErrorCtrl;

////@end CPanelPreferences member variables
GLOBAL_PREFS global_preferences_working;
Expand Down

0 comments on commit 85a33b9

Please sign in to comment.