From 3e6e2754a688f0db737e18fe4a138f83013ad8e9 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 4 Jul 2001 10:08:44 +0000 Subject: [PATCH] Added some missing tests; replaced scrolwin.cpp with scrlwng.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/chkconf.h | 19 +++++++++++++++++++ include/wx/generic/treectlg.h | 2 +- include/wx/imaglist.h | 6 ++++-- include/wx/listctrl.h | 4 +++- include/wx/msw/setup0.h | 3 +++ include/wx/treectrl.h | 4 +++- include/wx/univ/setup.h | 9 ++++----- src/generic/logg.cpp | 11 ++++++++--- src/wxvc.dsp | 2 +- src/wxvc_dll.dsp | 2 +- src/wxvc_universal.dsp | 2 +- 11 files changed, 48 insertions(+), 16 deletions(-) diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 86afdae52f..e69b19b420 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -229,6 +229,14 @@ # endif #endif /* !defined(wxUSE_LOGWINDOW) */ +#ifndef wxUSE_LOG_DIALOG +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOG_DIALOG must be defined." +# else +# define wxUSE_LOG_DIALOG 0 +# endif +#endif /* !defined(wxUSE_LOGWINDOW) */ + #ifndef wxUSE_MDI_ARCHITECTURE # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_MDI_ARCHITECTURE must be defined." @@ -716,6 +724,17 @@ # endif #endif /* wxUSE_LOGWINDOW */ +#if wxUSE_LOG_DIALOG +# if !wxUSE_LISTCTRL +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_LOG_DIALOG requires wxUSE_LISTCTRL" +# else +# undef wxUSE_LISTCTRL +# define wxUSE_LISTCTRL 1 +# endif +# endif +#endif /* wxUSE_LOG_DIALOG */ + /* I wonder if we shouldn't just remove all occurrences of wxUSE_DYNAMIC_CLASSES from the sources? */ #if !defined(wxUSE_DYNAMIC_CLASSES) || !wxUSE_DYNAMIC_CLASSES diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index 0357da9761..7958708b1e 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -425,7 +425,7 @@ private: DECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl) }; -#if !defined(__WXMSW__) || defined(__WIN16__) +#if !defined(__WXMSW__) || defined(__WIN16__) || defined(__WXUNIVERSAL__) /* * wxTreeCtrl has to be a real class or we have problems with * the run-time information. diff --git a/include/wx/imaglist.h b/include/wx/imaglist.h index abc63c4cec..8b10b0f524 100644 --- a/include/wx/imaglist.h +++ b/include/wx/imaglist.h @@ -1,8 +1,10 @@ #ifndef _WX_IMAGLIST_H_BASE_ #define _WX_IMAGLIST_H_BASE_ -#if defined(__WXMSW__) -#if defined(__WIN16__) || defined(__WXMICROWIN__) +#if defined(__WXUNIVERSAL__) +#include "wx/generic/imaglist.h" +#elif defined(__WXMSW__) +#if defined(__WIN16__) #include "wx/generic/imaglist.h" #else #include "wx/msw/imaglist.h" diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index eec8341ae9..b8b1d6d3e8 100644 --- a/include/wx/listctrl.h +++ b/include/wx/listctrl.h @@ -241,7 +241,9 @@ private: // include the wxListCtrl class declaration // ---------------------------------------------------------------------------- -#if defined(__WXMSW__) +#if defined(__WXUNIVERSAL__) + #include "wx/generic/listctrl.h" +#elif defined(__WXMSW__) #ifdef __WIN16__ #include "wx/generic/listctrl.h" #else diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 294e9e584d..0183b6da36 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -199,6 +199,9 @@ // Recommended setting: 1 (always) #define wxUSE_LOGGUI 1 +// Recommended setting: 1 (always) +#define wxUSE_LOG_DIALOG 1 + // Support for multithreaded applications: if 1, compile in thread classes // (thread.h) and make the library a bit more thread safe. Although thread // support is quite stable by now, you may still consider recompiling the diff --git a/include/wx/treectrl.h b/include/wx/treectrl.h index 1a2cc60c1c..08e0e15973 100644 --- a/include/wx/treectrl.h +++ b/include/wx/treectrl.h @@ -7,7 +7,9 @@ // include the platform-dependent wxTreeCtrl class // ---------------------------------------------------------------------------- -#if defined(__WXMSW__) +#if defined(__WXUNIVERSAL__) + #include "wx/generic/treectlg.h" +#elif defined(__WXMSW__) #ifdef __WIN16__ #include "wx/generic/treectlg.h" #else diff --git a/include/wx/univ/setup.h b/include/wx/univ/setup.h index 281b6bbfff..b5ef87546f 100644 --- a/include/wx/univ/setup.h +++ b/include/wx/univ/setup.h @@ -30,6 +30,9 @@ #define wxUSE_UNICODE 0 #define wxUSE_WCHAR_T 0 #define wxUSE_LOG 1 +#define wxUSE_LOGGUI 1 +#define wxUSE_LOGWINDOW 1 +#define wxUSE_LOG_DIALOG 0 #define wxUSE_THREADS 0 #define wxUSE_STREAMS 0 #define wxUSE_STD_IOSTREAM 0 @@ -49,11 +52,6 @@ #define wxUSE_FS_INET 0 #define wxUSE_ZIPSTREAM 0 #define wxUSE_ZLIB 0 -#define wxUSE_FILESYSTEM 0 -#define wxUSE_FS_ZIP 0 -#define wxUSE_FS_INET 0 -#define wxUSE_ZIPSTREAM 0 -#define wxUSE_ZLIB 0 #define wxUSE_APPLE_IEEE 0 #define wxUSE_FILE 1 #define wxUSE_FFILE 1 @@ -133,6 +131,7 @@ #define wxUSE_IPC 0 #define wxUSE_HELP 0 #define wxUSE_MS_HTML_HELP 0 +#define wxUSE_WXHTML_HELP 0 #define wxUSE_RESOURCES 0 #define wxUSE_CONSTRAINTS 1 #define wxUSE_CLIPBOARD 0 diff --git a/src/generic/logg.cpp b/src/generic/logg.cpp index 33849cc160..097c5945f0 100644 --- a/src/generic/logg.cpp +++ b/src/generic/logg.cpp @@ -152,7 +152,7 @@ END_EVENT_TABLE() // private functions // ---------------------------------------------------------------------------- -#if wxUSE_FILE +#if wxUSE_FILE && wxUSE_FILEDLG // pass an uninitialized file object, the function will ask the user for the // filename and try to open it, returns TRUE on success (file was opened), @@ -167,7 +167,7 @@ static int OpenLogFile(wxFile& file, wxString *filename = NULL); // ---------------------------------------------------------------------------- // we use a global variable to store the frame pointer for wxLogStatus - bad, -// but it's he easiest way +// but it's the easiest way static wxFrame *gs_pFrame; // FIXME MT-unsafe // ============================================================================ @@ -261,6 +261,7 @@ void wxLogGui::Flush() else // more than one message { #if wxUSE_LOG_DIALOG + wxLogDialog dlg(parent, m_aMessages, m_aSeverity, m_aTimes, title, style); @@ -504,6 +505,7 @@ void wxLogFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event)) #if wxUSE_FILE void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) { +#if wxUSE_FILEDLG wxString filename; wxFile file; int rc = OpenLogFile(file, &filename); @@ -532,6 +534,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) else { wxLogStatus(this, _("Log saved to the file '%s'."), filename.c_str()); } +#endif } #endif // wxUSE_FILE @@ -891,6 +894,7 @@ void wxLogDialog::OnOk(wxCommandEvent& WXUNUSED(event)) void wxLogDialog::OnSave(wxCommandEvent& WXUNUSED(event)) { +#if wxUSE_FILEDLG wxFile file; int rc = OpenLogFile(file); if ( rc == -1 ) @@ -925,6 +929,7 @@ void wxLogDialog::OnSave(wxCommandEvent& WXUNUSED(event)) if ( !ok ) wxLogError(_("Can't save log contents to file.")); +#endif } #endif // wxUSE_FILE @@ -991,7 +996,7 @@ wxLogDialog::~wxLogDialog() #endif // wxUSE_LOG_DIALOG -#if wxUSE_FILE +#if wxUSE_FILE && wxUSE_FILEDLG // pass an uninitialized file object, the function will ask the user for the // filename and try to open it, returns TRUE on success (file was opened), diff --git a/src/wxvc.dsp b/src/wxvc.dsp index 04d0daee71..8f1e5b3132 100644 --- a/src/wxvc.dsp +++ b/src/wxvc.dsp @@ -636,7 +636,7 @@ SOURCE=.\generic\sashwin.cpp # End Source File # Begin Source File -SOURCE=.\generic\scrolwin.cpp +SOURCE=.\generic\scrlwing.cpp # End Source File # Begin Source File diff --git a/src/wxvc_dll.dsp b/src/wxvc_dll.dsp index 96e5cdfea7..d5a9ce1fee 100644 --- a/src/wxvc_dll.dsp +++ b/src/wxvc_dll.dsp @@ -634,7 +634,7 @@ SOURCE=.\generic\sashwin.cpp # End Source File # Begin Source File -SOURCE=.\generic\scrolwin.cpp +SOURCE=.\generic\scrlwing.cpp # End Source File # Begin Source File diff --git a/src/wxvc_universal.dsp b/src/wxvc_universal.dsp index ca31ee0ada..ed70107b17 100644 --- a/src/wxvc_universal.dsp +++ b/src/wxvc_universal.dsp @@ -664,7 +664,7 @@ SOURCE=.\generic\sashwin.cpp # End Source File # Begin Source File -SOURCE=.\generic\scrolwin.cpp +SOURCE=.\generic\scrlwing.cpp # End Source File # Begin Source File -- 2.47.2