]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
delete-->delete[]
[wxWidgets.git] / src / common / utilscmn.cpp
index 4e4d3a92807d2213d62ba25328ae0f11b671b1c9..9f14c1b3cba250e23a55101c9ebbbe5b3aab431d 100644 (file)
@@ -95,7 +95,7 @@
     #include <sys/stat.h>
 #endif
 
-#ifdef __WXMSW__
+#if defined(__WXMSW__) && !defined(__PALMOS__)
     #include "wx/msw/private.h"
 #endif
 
@@ -547,10 +547,13 @@ bool wxYieldIfNeeded()
 // Id generation
 static long wxCurrentId = 100;
 
-long
-wxNewId (void)
+long wxNewId()
 {
-  return wxCurrentId++;
+    // skip the part of IDs space that contains hard-coded values:
+    if (wxCurrentId == wxID_LOWEST)
+        wxCurrentId = wxID_HIGHEST + 1;
+
+    return wxCurrentId++;
 }
 
 long
@@ -806,11 +809,19 @@ wxString wxGetTextFromUser(const wxString& message, const wxString& caption,
 wxString wxGetPasswordFromUser(const wxString& message,
                                const wxString& caption,
                                const wxString& defaultValue,
-                               wxWindow *parent)
+                               wxWindow *parent,
+                               wxCoord x, wxCoord y, bool centre )
 {
     wxString str;
-    wxTextEntryDialog dialog(parent, message, caption, defaultValue,
-                             wxOK | wxCANCEL | wxTE_PASSWORD);
+    long style = wxTextEntryDialogStyle;
+
+    if (centre)
+        style |= wxCENTRE;
+    else
+        style &= ~wxCENTRE;
+
+    wxPasswordEntryDialog dialog(parent, message, caption, defaultValue,
+                             style, wxPoint(x, y));
     if ( dialog.ShowModal() == wxID_OK )
     {
         str = dialog.GetValue();