}
- // we'll use this to decide whether we have to change the label of this
- // button or not (initially the label is "Next")
- bool btnLabelWasNext = true;
-
// remember the old bitmap (if any) to compare with the new one later
wxBitmap bmpPrev;
m_page->Hide();
- btnLabelWasNext = HasNextPage(m_page);
-
bmpPrev = m_page->GetBitmap();
if ( !m_usingSizer )
// and update the buttons state
m_btnPrev->Enable(HasPrevPage(m_page));
- bool hasNext = HasNextPage(m_page);
- if ( btnLabelWasNext != hasNext )
- {
- if ( hasNext )
- m_btnNext->SetLabel(_("&Next >"));
- else
- m_btnNext->SetLabel(_("&Finish"));
- }
- // nothing to do: the label was already correct
+ const bool hasNext = HasNextPage(m_page);
+ const wxString label = hasNext ? _("&Next >") : _("&Finish");
+ if ( label != m_btnNext->GetLabel() )
+ m_btnNext->SetLabel(label);
m_btnNext->SetDefault();
wxStandardDialogLayoutAdapter::DoFitWithScrolling(this, windows);
+ // Size event doesn't get sent soon enough on wxGTK
+ DoLayout();
+
SetLayoutAdaptationDone(true);
return true;
if (bmp.Ok())
{
wxSize pageSize = m_sizerPage->GetSize();
+ if (pageSize == wxSize(0,0))
+ pageSize = GetPageSize();
int bitmapWidth = wxMax(bmp.GetWidth(), GetMinimumBitmapWidth());
int bitmapHeight = pageSize.y;