mirror of https://github.com/BOINC/boinc.git
- MGR: Add support for simulating somebody hitting the cancel button in
the wizards. This is needed for a WCG feature. clientgui/ BOINCBaseWizard.cpp, .h wizardex.cpp, .h svn path=/trunk/boinc/; revision=16029
This commit is contained in:
parent
65a1bdab39
commit
1a2257c475
|
@ -7605,3 +7605,11 @@ David 19 Sept 2008
|
|||
lib/
|
||||
gui_rpc_client.C
|
||||
parse.C
|
||||
|
||||
Rom 19 Sept 2008
|
||||
- MGR: Add support for simulating somebody hitting the cancel button in
|
||||
the wizards. This is needed for a WCG feature.
|
||||
|
||||
clientgui/
|
||||
BOINCBaseWizard.cpp, .h
|
||||
wizardex.cpp, .h
|
||||
|
|
|
@ -169,3 +169,21 @@ void CBOINCBaseWizard::DisableBackButton() {
|
|||
m_btnPrev->Disable();
|
||||
}
|
||||
|
||||
wxButton* CBOINCBaseWizard::GetCancelButton() const {
|
||||
return m_btnCancel;
|
||||
}
|
||||
|
||||
void CBOINCBaseWizard::SimulateCancelButton() {
|
||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, m_btnCancel->GetId());
|
||||
event.SetEventObject(GetCancelButton());
|
||||
AddPendingEvent(event);
|
||||
}
|
||||
|
||||
void CBOINCBaseWizard::EnableCancelButton() {
|
||||
m_btnCancel->Enable();
|
||||
}
|
||||
|
||||
void CBOINCBaseWizard::DisableCancelButton() {
|
||||
m_btnCancel->Disable();
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,10 @@ public:
|
|||
void SimulateBackButton();
|
||||
void EnableBackButton();
|
||||
void DisableBackButton();
|
||||
wxButton* GetCancelButton() const;
|
||||
void SimulateCancelButton();
|
||||
void EnableCancelButton();
|
||||
void DisableCancelButton();
|
||||
|
||||
/// Wizard Detection
|
||||
bool IsAttachToProjectWizard;
|
||||
|
|
|
@ -400,10 +400,10 @@ void wxWizardEx::AddButtonRow(wxBoxSizer *mainColumn)
|
|||
#endif
|
||||
|
||||
m_btnNext = new wxButton(this, wxID_FORWARD, _("&Next >"));
|
||||
wxButton *btnCancel=new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, buttonStyle);
|
||||
m_btnCancel = new wxButton(this, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, buttonStyle);
|
||||
#ifndef __WXMAC__
|
||||
if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON)
|
||||
btnHelp=new wxButton(this, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, buttonStyle);
|
||||
btnHelp = new wxButton(this, wxID_HELP, _("&Help"), wxDefaultPosition, wxDefaultSize, buttonStyle);
|
||||
#endif
|
||||
m_btnPrev = new wxButton(this, wxID_BACKWARD, _("< &Back"), wxDefaultPosition, wxDefaultSize, buttonStyle);
|
||||
|
||||
|
@ -424,7 +424,7 @@ void wxWizardEx::AddButtonRow(wxBoxSizer *mainColumn)
|
|||
AddBackNextPair(buttonRow);
|
||||
|
||||
buttonRow->Add(
|
||||
btnCancel,
|
||||
m_btnCancel,
|
||||
0, // Horizontally unstretchable
|
||||
wxALL, // Border all around, top aligned
|
||||
5 // Border width
|
||||
|
|
|
@ -247,7 +247,8 @@ private:
|
|||
// wizard controls
|
||||
protected:
|
||||
wxButton *m_btnPrev, // the "<Back" button
|
||||
*m_btnNext; // the "Next>" or "Finish" button
|
||||
*m_btnNext, // the "Next>" or "Finish" button
|
||||
*m_btnCancel; // the "Cancel" button
|
||||
private:
|
||||
wxStaticBitmap *m_statbmp; // the control for the bitmap
|
||||
|
||||
|
|
Loading…
Reference in New Issue