]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/textdlgg.cpp
No real changes, just remove the ugly CONST_CAST macro.
[wxWidgets.git] / src / generic / textdlgg.cpp
index de16dbbd5c8d42f483ac862b7d556c9740611811..d1f96ebfe5368c861519c1042c28b3b1f4a45036 100644 (file)
@@ -42,8 +42,8 @@
     #include "wx/statline.h"
 #endif
 
-const wxChar wxGetTextFromUserPromptStr[] = wxT("Input Text");
-const wxChar wxGetPasswordFromUserPromptStr[] = wxT("Enter Password");
+const char wxGetTextFromUserPromptStr[] = "Input Text";
+const char wxGetPasswordFromUserPromptStr[] = "Enter Password";
 
 // ----------------------------------------------------------------------------
 // constants
@@ -71,7 +71,8 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
                                      const wxString& value,
                                      long style,
                                      const wxPoint& pos)
-                 : wxDialog(parent, wxID_ANY, caption, pos, wxDefaultSize,
+                 : wxDialog(GetParentForModalDialog(parent),
+                            wxID_ANY, caption, pos, wxDefaultSize,
                             wxDEFAULT_DIALOG_STYLE),
                    m_value(value)
 {
@@ -106,7 +107,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
 #endif // wxUSE_VALIDATORS
 
     // 3) buttons if any
-    wxSizer *buttonSizer = CreateSeparatedButtonSizer(style & ButtonSizerFlags);
+    wxSizer *buttonSizer = CreateSeparatedButtonSizer(style & (wxOK | wxCANCEL));
     if ( buttonSizer )
     {
         topsizer->Add(buttonSizer, wxSizerFlags(flagsBorder2).Expand());
@@ -150,7 +151,15 @@ void wxTextEntryDialog::SetValue(const wxString& val)
 }
 
 #if wxUSE_VALIDATORS
+
+#if WXWIN_COMPATIBILITY_2_8
 void wxTextEntryDialog::SetTextValidator( long style )
+{
+    SetTextValidator((wxTextValidatorStyle)style);
+}
+#endif
+
+void wxTextEntryDialog::SetTextValidator( wxTextValidatorStyle style )
 {
     wxTextValidator validator( style, &m_value );
     m_textctrl->SetValidator( validator );