]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
Missing datetime and the db classes!!
[wxWidgets.git] / src / common / utilscmn.cpp
index ec09523cc72792eb76a717b543dc6bb4e92c45e5..9af79de3296495dc1990c7d8bfc6467896988ebd 100644 (file)
@@ -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__