From: Vadim Zeitlin Date: Sun, 24 Feb 2002 00:19:01 +0000 (+0000) Subject: added wxUSE_FSVOLUME X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/05815ab32f501810bf0923a511f7d99b90b808a2 added wxUSE_FSVOLUME git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/chkconf.h b/include/wx/chkconf.h index 512a498a38..e11fad03ac 100644 --- a/include/wx/chkconf.h +++ b/include/wx/chkconf.h @@ -50,6 +50,14 @@ # endif #endif /* !defined(wxUSE_DYNLIB_CLASS) */ +#ifndef wxUSE_FSVOLUME +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_FSVOLUME +# else +# define wxUSE_FSVOLUME 0 +# endif +#endif /* !defined(wxUSE_FSVOLUME) */ + #ifndef wxUSE_DYNAMIC_LOADER # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_DYNAMIC_LOADER must be defined." diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 11295bf3fb..6b3ee07170 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -267,6 +267,13 @@ #define wxUSE_FILE 1 #define wxUSE_FFILE 1 +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + // use wxTextBuffer class: required by wxTextFile #define wxUSE_TEXTBUFFER 1 diff --git a/include/wx/volume.h b/include/wx/volume.h index 32d2f9fed5..a65ce2f2bb 100644 --- a/include/wx/volume.h +++ b/include/wx/volume.h @@ -20,6 +20,10 @@ #pragma interface "fsvolume.h" #endif +#include "wx/defs.h" + +#if wxUSE_FSVOLUME + // the volume flags enum { @@ -49,6 +53,9 @@ enum wxFSVolumeKind }; #if wxUSE_GUI + +#include "wx/icon.h" + enum wxFSIconType { wxFS_VOL_ICO_SMALL = 0, @@ -57,10 +64,11 @@ enum wxFSIconType wxFS_VOL_ICO_SEL_LARGE, wxFS_VOL_ICO_MAX }; -#endif // wxUSE_GUI WX_DECLARE_OBJARRAY(wxIcon, wxIconArray); +#endif // wxUSE_GUI + class WXDLLEXPORT wxFSVolume { public: @@ -118,5 +126,7 @@ private: }; +#endif // wxUSE_FSVOLUME + #endif // _WX_FSVOLUME_H_ diff --git a/setup.h.in b/setup.h.in index 53d041b807..5404666d87 100644 --- a/setup.h.in +++ b/setup.h.in @@ -508,6 +508,11 @@ * Use wxFFile class */ #define wxUSE_FFILE 0 +/* + * Use wxFSVolume class + */ +#define wxUSE_FSVOLUME 1 + /* * Use wxTextBuffer class */ diff --git a/src/msw/volume.cpp b/src/msw/volume.cpp index 378c3fff1b..4812244e48 100644 --- a/src/msw/volume.cpp +++ b/src/msw/volume.cpp @@ -27,9 +27,11 @@ #pragma hdrstop #endif +#if wxUSE_FSVOLUME + #ifndef WX_PRECOMP -#include -#include + #include "wx/icon.h" + #include "wx/intl.h" #endif // WX_PRECOMP #include "wx/dir.h" @@ -586,3 +588,5 @@ wxIcon wxFSVolume::GetIcon(wxFSIconType type) const #endif // wxUSE_GUI +#endif // wxUSE_FSVOLUME +