X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0cc483d1739bb355a9deb6e0f56c0eb3a5f5f97..0281278534339322516fa6133ed4df925c2156be:/src/generic/choicdgg.cpp?ds=sidebyside diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index 15e85bb44a..2b5b11b2a2 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -59,7 +59,7 @@ // --------------------------------------------------------------------------- /* Macro for avoiding #ifdefs when value have to be different depending on size of - device we display on + device we display on - take it from something like wxDesktopPolicy in the future */ #if defined(__SMARTPHONE__) @@ -218,8 +218,9 @@ size_t wxGetMultipleChoices(wxArrayInt& selections, { wxMultiChoiceDialog dialog(parent, message, caption, n, choices); - if ( !selections.IsEmpty() ) - dialog.SetSelections(selections); + // call this even if selections array is empty and this then (correctly) + // deselects the first item which is selected by default + dialog.SetSelections(selections); if ( dialog.ShowModal() == wxID_OK ) selections = dialog.GetSelections(); @@ -278,6 +279,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent, topsizer->Add( m_listbox, 1, wxEXPAND | wxLEFT|wxRIGHT, wxLARGESMALL(15,0) ); + // smart phones does not support or do not waste space for wxButtons #ifdef __SMARTPHONE__ SetRightMenu(wxID_CANCEL, _("Cancel")); @@ -290,7 +292,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent, #endif // 4) buttons - topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wxCENTRE | wxALL, 10 ); + topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wxEXPAND | wxALL, 10 ); #endif // !__SMARTPHONE__