X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/08873d362be3e09d83b2da7b062f5c5f4e4f3711..1c5d27e2ab8373d0fb2142ed96aed76f8b5773bc:/src/common/utilscmn.cpp diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 205d577d42..6c7f69d3b9 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -19,7 +19,7 @@ #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__) // Some older compilers (such as EMX) cannot handle -// #pragma interface/implementation correctly, iff +// #pragma interface/implementation correctly, iff // #pragma implementation is used in _two_ translation // units (as created by e.g. event.cpp compiled for // libwx_base and event.cpp compiled for libwx_gui_core). @@ -505,7 +505,10 @@ static long wxDoExecuteWithCapture(const wxString& command, } } -#endif // wxUSE_STREAMS +#else + wxUnusedVar(output); + wxUnusedVar(error); +#endif // wxUSE_STREAMS/!wxUSE_STREAMS delete process; @@ -785,10 +788,18 @@ int wxMessageBox(const wxString& message, const wxString& caption, long style, wxString wxGetTextFromUser(const wxString& message, const wxString& caption, const wxString& defaultValue, wxWindow *parent, - int x, int y, bool WXUNUSED(centre) ) + wxCoord x, wxCoord y, bool centre ) { wxString str; - wxTextEntryDialog dialog(parent, message, caption, defaultValue, wxOK|wxCANCEL, wxPoint(x, y)); + long style = wxTextEntryDialogStyle; + + if (centre) + style |= wxCENTRE; + else + style &= ~wxCENTRE; + + wxTextEntryDialog dialog(parent, message, caption, defaultValue, style, wxPoint(x, y)); + if (dialog.ShowModal() == wxID_OK) { str = dialog.GetValue();