From 4ad3c82fff70f03b0b1d01331e4fd53bb51a9eca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 25 Nov 2000 22:44:55 +0000 Subject: [PATCH] compilation fix for !wxUSE_DIRDLGG git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/dialogs/dialogs.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index f2d8a6ead2..632fdf155d 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -33,9 +33,6 @@ #include "wx/tipdlg.h" #include "wx/progdlg.h" -// New wxGenericDirCtrl -#include "wx/dirctrl.h" - #define wxTEST_GENERIC_DIALOGS_IN_MSW 0 #if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW @@ -43,6 +40,11 @@ #include #endif +#if !defined(__WXMSW__) || defined(wxUSE_DIRDLGG) && wxUSE_DIRDLGG +// New wxGenericDirCtrl +#include "wx/dirctrl.h" +#endif + #include "dialogs.h" IMPLEMENT_APP(MyApp) @@ -480,6 +482,7 @@ void MyFrame::DirChoose(wxCommandEvent& WXUNUSED(event) ) void MyFrame::GenericDirChoose(wxCommandEvent& WXUNUSED(event) ) { +#if !defined(__WXMSW__) || defined(wxUSE_DIRDLGG) && wxUSE_DIRDLGG // pass some initial dir to wxDirDialog wxString dirHome; wxGetHomeDir(&dirHome); @@ -491,6 +494,10 @@ void MyFrame::GenericDirChoose(wxCommandEvent& WXUNUSED(event) ) wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path"); dialog2.ShowModal(); } +#else + wxLogError("Sorry, generic dir dialog not available:\n" + "set wxUSE_DIRDLGG to 1 and recompile"); +#endif } void MyFrame::ModalDlg(wxCommandEvent& WXUNUSED(event)) -- 2.45.2