X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed679e7422b03da13d979f78240e9a0300dfbcd0..d32b901bac42e4f8833720fd6eee60de7d870e0d:/samples/dialogs/dialogs.cpp diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 22ff54978c..598fe7f515 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -480,6 +480,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) ) } #endif // USE_FONTDLG_GENERIC +#if wxUSE_LOG_DIALOG void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event)) { // calling wxYield() (as ~wxBusyCursor does) shouldn't result in messages @@ -501,6 +502,7 @@ void MyFrame::LogDialog(wxCommandEvent& WXUNUSED(event)) wxLogMessage(wxT("And this is the same dialog but with only one message.")); } +#endif // wxUSE_LOG_DIALOG void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event) ) { @@ -576,8 +578,7 @@ void MyFrame::TextEntry(wxCommandEvent& WXUNUSED(event)) if (dialog.ShowModal() == wxID_OK) { - wxMessageDialog dialog2(this, dialog.GetValue(), _T("Got string")); - dialog2.ShowModal(); + wxMessageBox(dialog.GetValue(), _T("Got string"), wxOK | wxICON_INFORMATION, this); } } #endif // wxUSE_TEXTDLG @@ -646,7 +647,7 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) ) #ifdef __WXMOTIF__ _T("C++ files (*.cpp)|*.cpp") #else - _T("C++ files (*.h;*.cpp)|*.h;*.cpp") + _T("C++ files (*.cpp;*.h)|*.cpp;*.h") #endif ); @@ -697,7 +698,7 @@ void MyFrame::FilesOpen(wxCommandEvent& WXUNUSED(event) ) #ifdef __WXMOTIF__ _T("C++ files (*.cpp)|*.cpp"); #else - _T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp"); + _T("All files (*.*)|*.*|C++ files (*.cpp;*.h)|*.cpp;*.h"); #endif wxFileDialog dialog(this, _T("Testing open multiple file dialog"), wxEmptyString, wxEmptyString, wildcards, @@ -755,7 +756,7 @@ void MyFrame::FileOpenGeneric(wxCommandEvent& WXUNUSED(event) ) _T("Testing open file dialog"), wxEmptyString, wxEmptyString, - _T("C++ files (*.h;*.cpp)|*.h;*.cpp") + _T("C++ files (*.cpp;*.h)|*.cpp;*.h") ); dialog.SetDirectory(wxGetHomeDir()); @@ -776,7 +777,7 @@ void MyFrame::FileOpenGeneric(wxCommandEvent& WXUNUSED(event) ) void MyFrame::FilesOpenGeneric(wxCommandEvent& WXUNUSED(event) ) { - wxString wildcards = _T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp"); + wxString wildcards = _T("All files (*.*)|*.*|C++ files (*.cpp;*.h)|*.cpp;*.h"); wxGenericFileDialog dialog(this, _T("Testing open multiple file dialog"), wxEmptyString, wxEmptyString, wildcards, wxMULTIPLE); @@ -1134,9 +1135,16 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event) ) dc.SetFont(wxGetApp().m_canvasFont); dc.SetTextForeground(wxGetApp().m_canvasTextColour); dc.SetBackgroundMode(wxTRANSPARENT); - dc.DrawText(_T("wxWidgets common dialogs test application"), 10, 10); + dc.DrawText( + _T("wxWidgets common dialogs") +#if !defined(__SMARTPHONE__) + _T(" test application") +#endif + , 10, 10); } +#if USE_MODAL_PRESENTATION + // ---------------------------------------------------------------------------- // MyModelessDialog // ---------------------------------------------------------------------------- @@ -1233,3 +1241,6 @@ void MyModalDialog::OnButton(wxCommandEvent& event) event.Skip(); } } + +#endif // USE_MODAL_PRESENTATION +