]> git.saurik.com Git - wxWidgets.git/commitdiff
do platform-specific checks after ensuring that the symbols we use are defined; extra...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Jul 2007 15:47:11 +0000 (15:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 19 Jul 2007 15:47:11 +0000 (15:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

Makefile.in
build/bakefiles/files.bkl
include/wx/chkconf.h
include/wx/gtk/chkconf.h [new file with mode: 0644]
include/wx/msw/wince/chkconf.h

index 69c5596644f3012a02904be9dc25192c59fff2cd..7ab15bc78d0047e2ef5bfe990ef12725f7a44b8b 100644 (file)
@@ -2304,6 +2304,7 @@ COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_GUI_HDR =  \
        wx/gtk/button.h \
        wx/gtk/checkbox.h \
        wx/gtk/checklst.h \
+       wx/gtk/chkconf.h \
        wx/gtk/collpane.h \
        wx/gtk/colordlg.h \
        wx/gtk/choice.h \
index 0e5ecaa0a8fddb3e9eb3bb8a82aec3e15c504919..c2d4f7884a7c802681fd88508edbededbdeb77e5 100644 (file)
@@ -1084,6 +1084,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     wx/gtk/button.h
     wx/gtk/checkbox.h
     wx/gtk/checklst.h
+    wx/gtk/chkconf.h
     wx/gtk/collpane.h
     wx/gtk/colordlg.h
     wx/gtk/choice.h
index d03d33d53a52f1b808f6f040022966c745f5259a..609d019950245b8f1785625ed727f898312e5a30 100644 (file)
 #define _WX_CHKCONF_H_
 
 /*
-   Platform-specific checking.
+   This file has the following sections:
+    1. checks that all wxUSE_XXX symbols we use are defined
+     a) first the non-GUI ones
+     b) then the GUI-only ones
+    2. platform-specific checks done in the platform headers
+    3. generic consistency checks
+     a) first the non-GUI ones
+     b) then the GUI-only ones
  */
 
-#if defined(__WXPALMOS__)
-#  include "wx/palmos/chkconf.h"
-#elif defined(__WXWINCE__)
-#  include "wx/msw/wince/chkconf.h"
-#elif defined(__WXMSW__)
-#  include "wx/msw/chkconf.h"
-#elif defined(__WXMAC__)
-#  include "wx/mac/chkconf.h"
-#elif defined(__OS2__)
-#  include "wx/os2/chkconf.h"
-#elif defined(__WXMGL__)
-#  include "wx/mgl/chkconf.h"
-#elif defined(__WXDFB__)
-#  include "wx/dfb/chkconf.h"
-#elif defined(__WXMOTIF__)
-#  include "wx/motif/chkconf.h"
-#elif defined(__WXX11__)
-#  include "wx/x11/chkconf.h"
-#endif
-
-#ifdef __UNIX__
-#   include "wx/unix/chkconf.h"
-#endif
-
-#ifdef __WXUNIVERSAL__
-#   include "wx/univ/chkconf.h"
-#endif
-
 /*
    this global setting determines what should we do if the setting FOO
    requires BAR and BAR is not set: we can either silently unset FOO as well
@@ -84,7 +63,7 @@
 
 
 /*
-   tests for non GUI features
+   Section 1a: tests for non GUI features.
 
    please keep the options in alphabetical order!
  */
 #endif /* wxUSE_VARIANT */
 
 /*
-   all these tests are for GUI only
+   Section 1b: all these tests are for GUI only.
 
    please keep the options in alphabetical order!
  */
 #endif /* wxUSE_GUI */
 
 /*
-   check consistency of the settings
+   Section 2: platform-specific checks.
+
+   This must be done after checking that everything is defined as the platform
+   checks use wxUSE_XXX symbols in #if tests.
+ */
+
+#if defined(__WXPALMOS__)
+#  include "wx/palmos/chkconf.h"
+#elif defined(__WXWINCE__)
+#  include "wx/msw/wince/chkconf.h"
+#elif defined(__WXMSW__)
+#  include "wx/msw/chkconf.h"
+#elif defined(__WXGTK__)
+#  include "wx/gtk/chkconf.h"
+#elif defined(__WXMAC__)
+#  include "wx/mac/chkconf.h"
+#elif defined(__OS2__)
+#  include "wx/os2/chkconf.h"
+#elif defined(__WXMGL__)
+#  include "wx/mgl/chkconf.h"
+#elif defined(__WXDFB__)
+#  include "wx/dfb/chkconf.h"
+#elif defined(__WXMOTIF__)
+#  include "wx/motif/chkconf.h"
+#elif defined(__WXX11__)
+#  include "wx/x11/chkconf.h"
+#endif
+
+#ifdef __UNIX__
+#   include "wx/unix/chkconf.h"
+#endif
+
+#ifdef __WXUNIVERSAL__
+#   include "wx/univ/chkconf.h"
+#endif
+
+/*
+   Section 3a: check consistency of the non-GUI settings.
  */
 
 #if WXWIN_COMPATIBILITY_2_6
 #   endif
 #endif /* wxUSE_TARSTREAM */
 
-/* the rest of the tests is for the GUI settings only */
+/*
+   Section 3b: the tests for the GUI settings only.
+ */
 #if wxUSE_GUI
 
 #if wxUSE_BUTTON || \
 #endif /* wxUSE_GRAPHICS_CONTEXT */
 
 
-/* wxGTK-specific dependencies */
-#ifdef __WXGTK__
-#   ifndef __WXUNIVERSAL__
-#       if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
-#           ifdef wxABORT_ON_CONFIG_ERROR
-#               error "MDI requires wxUSE_MENUS in wxGTK"
-#           else
-#               undef wxUSE_MENUS
-#               define wxUSE_MENUS 1
-#           endif
-#       endif
-#   endif /* !__WXUNIVERSAL__ */
-
-#   if wxUSE_JOYSTICK
-#       if !wxUSE_THREADS
-#           ifdef wxABORT_ON_CONFIG_ERROR
-#               error "wxJoystick requires threads in wxGTK"
-#           else
-#               undef wxUSE_JOYSTICK
-#               define wxUSE_JOYSTICK 0
-#           endif
-#       endif
-#   endif
-#endif /* wxGTK && !wxUniv */
-
-/* Hopefully we can emulate these dialogs in due course */
-#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
-#   ifdef wxUSE_COLOURDLG
-#       undef wxUSE_COLOURDLG
-#       define wxUSE_COLOURDLG 0
-#   endif
-#endif /* __SMARTPHONE__ && __WXWINCE__ */
-
-
 /* generic controls dependencies */
 #if !defined(__WXMSW__) || defined(__WXUNIVERSAL__)
 #   if wxUSE_FONTDLG || wxUSE_FILEDLG || wxUSE_CHOICEDLG
diff --git a/include/wx/gtk/chkconf.h b/include/wx/gtk/chkconf.h
new file mode 100644 (file)
index 0000000..1f83d48
--- /dev/null
@@ -0,0 +1,31 @@
+/*
+ * Name:        wx/gtk/chkconf.h
+ * Purpose:     wxGTK-specific settings consistency checks
+ * Author:      Vadim Zeitlin
+ * Created:     2007-07-19 (extracted from wx/chkconf.h)
+ * RCS-ID:      $Id$
+ * Copyright:   (c) 2000-2007 Vadim Zeitlin <vadim@wxwidgets.org>
+ * Licence:     wxWindows licence
+ */
+
+#ifndef __WXUNIVERSAL__
+#    if wxUSE_MDI_ARCHITECTURE && !wxUSE_MENUS
+#        ifdef wxABORT_ON_CONFIG_ERROR
+#            error "MDI requires wxUSE_MENUS in wxGTK"
+#        else
+#            undef wxUSE_MENUS
+#            define wxUSE_MENUS 1
+#        endif
+#    endif
+#endif /* !__WXUNIVERSAL__ */
+
+#if wxUSE_JOYSTICK
+#    if !wxUSE_THREADS
+#        ifdef wxABORT_ON_CONFIG_ERROR
+#            error "wxJoystick requires threads in wxGTK"
+#        else
+#            undef wxUSE_JOYSTICK
+#            define wxUSE_JOYSTICK 0
+#        endif
+#    endif
+#endif /* wxUSE_JOYSTICK */
index 2c2b6580872bd68ce7237781c85b9f725ae52335..d2a03195668c4fb68cfed3d5f740ca4f060d1821 100644 (file)
@@ -69,7 +69,6 @@
 #undef wxUSE_UNICODE_MSLU
 #define wxUSE_UNICODE_MSLU 0
 
-
 // Disable features which don't make sense for MS Smartphones
 // (due to pointer device usage, limited controls or dialogs, file system)
 #if defined(__SMARTPHONE__)
@@ -84,6 +83,9 @@
 
     #undef wxUSE_COLOURPICKERCTRL
     #define wxUSE_COLOURPICKERCTRL 0
+
+    #undef wxUSE_COLOURDLG
+    #define wxUSE_COLOURDLG 0
 #endif // __SMARTPHONE__
 
 #endif // _WX_MSW_WINCE_CHKCONF_H_