X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e90c1d2a19361551eb07778280f22be3e759cf64..f76dbc4d52c005b63745cf924efe30eece4c6f79:/src/common/prntbase.cpp?ds=sidebyside diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 4de06a39de..ce52bc53fd 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -384,14 +384,21 @@ void wxPreviewControlBar::CreateButtons() "120%", "150%", "200%" }; - m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM, - wxPoint(x, y), wxSize(100, -1)); - - // Yes, this look stupid, but this is because gcc gives up otherwise. int n = WXSIZEOF(choices); - for ( int i = 0; i < n; i++ ) - m_zoomControl->Append(choices[i]); - + + wxString* strings = new wxString[n]; + int i; + for (i = 0; i < n; i++ ) + strings[i] = choices[i]; + + m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM, + wxPoint(x, y), + wxSize(100, -1), + n, + strings + ); + delete[] strings; + SetZoomControl(m_printPreview->GetZoom()); } @@ -402,6 +409,7 @@ void wxPreviewControlBar::SetZoomControl(int zoom) { char buf[20]; sprintf(buf, "%d%%", zoom); +// Someone is calling methods that do no exist in wxChoice!! So I'll just comment out for VA for now if (m_zoomControl) m_zoomControl->SetStringSelection(buf); } @@ -409,7 +417,7 @@ void wxPreviewControlBar::SetZoomControl(int zoom) int wxPreviewControlBar::GetZoomControl() { wxChar buf[20]; - if (m_zoomControl && (m_zoomControl->GetStringSelection() != T(""))) + if (m_zoomControl && (m_zoomControl->GetStringSelection() != wxT(""))) { wxStrcpy(buf, m_zoomControl->GetStringSelection()); buf[wxStrlen(buf) - 1] = 0;