X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dfad0599246651d4994e348d868a3e65613c7379..91b8de8dee3e7ae3c4edc0ab0923b84bba20d9c4:/src/generic/textdlgg.cpp diff --git a/src/generic/textdlgg.cpp b/src/generic/textdlgg.cpp index c582cc875f..cec7c36217 100644 --- a/src/generic/textdlgg.cpp +++ b/src/generic/textdlgg.cpp @@ -45,17 +45,17 @@ IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) #endif // Split message, using constraints to position controls -static void wxSplitMessage2(const char *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer) +static 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); @@ -79,7 +79,7 @@ static void wxSplitMessage2(const char *message, wxList *messageList, wxWindow * wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption, const wxString& value, long style, const wxPoint& pos): - wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) + wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL) { m_dialogStyle = style; m_value = value; @@ -127,17 +127,18 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, c->top.Below (spacingSizer2); c->centreX.SameAs (textSizer, wxCentreX); buttonSizer->SetConstraints(c); + buttonSizer->SetSpacing(12,0); wxButton *ok = NULL; wxButton *cancel = NULL; 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); }