X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfad0599246651d4994e348d868a3e65613c7379..f861258fcace51a1aaba2f31c7498b3ba9e31371:/src/generic/msgdlgg.cpp diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index 498dccc0b6..31e731998d 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -39,17 +39,17 @@ // New dialog box implementations // Split message, using constraints to position controls -void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer) +void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer) { - char *copyMessage = copystring(message); + wxChar *copyMessage = copystring(message); size_t i = 0; - size_t len = strlen(copyMessage); - char *currentMessage = copyMessage; + size_t len = wxStrlen(copyMessage); + wxChar *currentMessage = copyMessage; // wxWindow *lastWindow = parent; while (i < len) { - while ((i < len) && (copyMessage[i] != '\n')) i++; + while ((i < len) && (copyMessage[i] != _T('\n'))) i++; if (i < len) copyMessage[i] = 0; wxStaticText *mess = new wxStaticText(parent, -1, currentMessage); @@ -99,7 +99,7 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString& topSizer->SetBorder(10, 10); wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100); - messageSizer->SetName("messageSizer"); + messageSizer->SetName(_T("messageSizer")); // bool centre = ((style & wxCENTRE) == wxCENTRE); @@ -110,7 +110,8 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString& wxSpacingSizer *spacingSizer = new wxSpacingSizer(topSizer, wxBelow, messageSizer, 20); wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); - buttonSizer->SetName("buttonSizer"); + buttonSizer->SetName(_T("buttonSizer")); + buttonSizer->SetSpacing(12,0); // Specify constraints for the button sizer wxLayoutConstraints *c = new wxLayoutConstraints; @@ -126,20 +127,20 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString& wxButton *no = (wxButton *) NULL; if (style & wxYES_NO) { - yes = new wxButton(this, wxID_YES, _("Yes")); - no = new wxButton(this, wxID_NO, _("No")); + yes = new wxButton(this, wxID_YES, _("Yes"), wxDefaultPosition, wxSize(75,-1) ); + no = new wxButton(this, wxID_NO, _("No"), wxDefaultPosition, wxSize(75,-1) ); buttonSizer->AddSizerChild(yes); buttonSizer->AddSizerChild(no); } if (style & wxOK) { - ok = new wxButton(this, wxID_OK, _("OK")); + ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1) ); buttonSizer->AddSizerChild(ok); } if (style & wxCANCEL) { - cancel = new wxButton(this, wxID_CANCEL, _("Cancel")); + cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1) ); buttonSizer->AddSizerChild(cancel); }