From 5919d76b444dab2037a1ff327f5683554bcd3dd2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 23 Mar 1999 15:52:39 +0000 Subject: [PATCH] EndModal() isn't called twice any more git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/dialogs/Makefile.in | 2 +- samples/dialogs/dialogs.cpp | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/samples/dialogs/Makefile.in b/samples/dialogs/Makefile.in index a4529f0a37..055f586aed 100644 --- a/samples/dialogs/Makefile.in +++ b/samples/dialogs/Makefile.in @@ -7,7 +7,7 @@ OS=@OS@ RULE=bin # define library name -BIN_TARGET=test +BIN_TARGET=dialogs # define library sources BIN_SRC=\ dialogs.cpp diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 257720dc07..45f60574a7 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -121,7 +121,7 @@ void MyFrame::ChooseColour(wxCommandEvent& WXUNUSED(event) ) myCanvas->Clear(); myCanvas->Refresh(); } - dialog->Close(); + dialog->Destroy(); } void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) ) @@ -138,7 +138,7 @@ void MyFrame::ChooseFont(wxCommandEvent& WXUNUSED(event) ) wxGetApp().m_canvasTextColour = retData.GetColour(); myCanvas->Refresh(); } - dialog->Close(); + dialog->Destroy(); } #if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW @@ -162,7 +162,7 @@ void MyFrame::ChooseColourGeneric(wxCommandEvent& WXUNUSED(event)) myCanvas->Clear(); myCanvas->Refresh(); } - dialog->Close(); + dialog->Destroy(); } void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) ) @@ -179,7 +179,7 @@ void MyFrame::ChooseFontGeneric(wxCommandEvent& WXUNUSED(event) ) wxGetApp().m_canvasTextColour = retData.GetColour(); myCanvas->Refresh(); } - dialog->Close(); + dialog->Destroy(); } #endif @@ -226,7 +226,14 @@ void MyFrame::FileOpen(wxCommandEvent& WXUNUSED(event) ) if (dialog.ShowModal() == wxID_OK) { - wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path"); + wxString info; + info.Printf("Full file name: %s\n" + "Path: %s\n" + "Name: %s", + dialog.GetPath().c_str(), + dialog.GetDirectory().c_str(), + dialog.GetFilename().c_str()); + wxMessageDialog dialog2(this, info, "Selected file"); dialog2.ShowModal(); } } -- 2.45.2