X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74b31181b345aaaef0c967cc5707bef72ce0a405..617ec45690c340d059726a09ccfe4bab9a42d82e:/src/generic/wizard.cpp diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index 4d70f33f01..7981bf47aa 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -187,7 +187,7 @@ wxWizard::wxWizard(wxWindow *parent, bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) { - wxASSERT_MSG( page != m_page, _T("this is useless") ); + wxASSERT_MSG( page != m_page, wxT("this is useless") ); // we'll use this to decide whether we have to change the label of this // button or not (initially the label is "Next") @@ -240,10 +240,14 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) // and update the buttons state m_btnPrev->Enable(m_page->GetPrev() != (wxWizardPage *)NULL); - if ( btnLabelWasNext != (m_page->GetNext() != (wxWizardPage *)NULL) ) + bool hasNext = m_page->GetNext() != (wxWizardPage *)NULL; + if ( btnLabelWasNext != hasNext ) { // need to update - m_btnNext->SetLabel(btnLabelWasNext ? _("&Finish") : _("&Next >")); + if (btnLabelWasNext) + m_btnNext->SetLabel(_("&Finish")); + else + m_btnNext->SetLabel(_("&Next >")); } // nothing to do: the label was already correct @@ -252,7 +256,7 @@ bool wxWizard::ShowPage(wxWizardPage *page, bool goingForward) bool wxWizard::RunWizard(wxWizardPage *firstPage) { - wxCHECK_MSG( firstPage, FALSE, _T("can't run empty wizard") ); + wxCHECK_MSG( firstPage, FALSE, wxT("can't run empty wizard") ); // can't return FALSE here because there is no old page (void)ShowPage(firstPage, TRUE /* forward */); @@ -265,6 +269,11 @@ wxWizardPage *wxWizard::GetCurrentPage() const return m_page; } +wxSize wxWizard::GetPageSize() const +{ + return wxSize(m_width, m_height); +} + void wxWizard::OnCancel(wxCommandEvent& WXUNUSED(event)) { // this function probably can never be called when we don't have an active @@ -284,7 +293,7 @@ void wxWizard::OnBackOrNext(wxCommandEvent& event) { wxASSERT_MSG( (event.GetEventObject() == m_btnNext) || (event.GetEventObject() == m_btnPrev), - _T("unknown button") ); + wxT("unknown button") ); bool forward = event.GetEventObject() == m_btnNext; @@ -297,7 +306,7 @@ void wxWizard::OnBackOrNext(wxCommandEvent& event) { page = m_page->GetPrev(); - wxASSERT_MSG( page, _T("\"