]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/choicdgg.cpp
Use wxMBConvUTF8 when G_FILENAME_ENCODING is UTF-8, and set
[wxWidgets.git] / src / generic / choicdgg.cpp
index 6e591c78cd370f518078f969e82b20e1e51db83a..2b5b11b2a2c2bac8be91b2bca346621067a7e346 100644 (file)
@@ -218,8 +218,9 @@ size_t wxGetMultipleChoices(wxArrayInt& selections,
 {
     wxMultiChoiceDialog dialog(parent, message, caption, n, choices);
 
 {
     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();
 
     if ( dialog.ShowModal() == wxID_OK )
         selections = dialog.GetSelections();
@@ -291,7 +292,7 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
 #endif
 
     // 4) buttons
 #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__
 
 
 #endif // !__SMARTPHONE__