X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10f206ad20fc410d57885a2d0e143a3c52075834..f68535b0a71224f6da88857e530607c12cd280eb:/src/common/utilscmn.cpp?ds=sidebyside diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 4e4d3a9280..9f14c1b3cb 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -95,7 +95,7 @@ #include #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();