From d2f5093319b09251870da78e5578eec55942a531 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 24 Jan 2000 20:18:03 +0000 Subject: [PATCH] implementation of wxGetPasswordFromUser git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/utilscmn.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index ec09523cc7..9af79de329 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -880,12 +880,32 @@ wxString wxGetTextFromUser(const wxString& message, const wxString& caption, const wxString& defaultValue, wxWindow *parent, int x, int y, bool WXUNUSED(centre) ) { + wxString str; wxTextEntryDialog dialog(parent, message, caption, defaultValue, wxOK|wxCANCEL, wxPoint(x, y)); if (dialog.ShowModal() == wxID_OK) - return dialog.GetValue(); - else - return wxString(""); + { + str = dialog.GetValue(); + } + + return str; } + +wxString wxGetPasswordFromUser(const wxString& message, + const wxString& caption, + const wxString& defaultValue, + wxWindow *parent) +{ + wxString str; + wxTextEntryDialog dialog(parent, message, caption, defaultValue, + wxOK | wxCANCEL | wxTE_PASSWORD); + if ( dialog.ShowModal() == wxID_OK ) + { + str = dialog.GetValue(); + } + + return str; +} + #endif // wxUSE_TEXTDLG #ifdef __MWERKS__ -- 2.47.2