]> git.saurik.com Git - wxWidgets.git/commitdiff
added configure option for wxUSE_AUTOID_MANAGEMENT
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Jan 2008 21:01:38 +0000 (21:01 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 6 Jan 2008 21:01:38 +0000 (21:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

configure
configure.in
include/wx/datetime.h
include/wx/mac/setup0.h
include/wx/motif/setup0.h
include/wx/msw/setup0.h
include/wx/msw/wince/setup.h
include/wx/os2/setup0.h
include/wx/palmos/setup0.h
include/wx/setup_inc.h
setup.h.in

index 85afe3853f4b2a804eacf3bbf5428c2b46026a6f..bab32b059c157e1f51fd4d34c8902299b9a2a110 100755 (executable)
--- a/configure
+++ b/configure
@@ -1850,6 +1850,7 @@ Optional Features:
   --enable-ownerdrawn     use owner drawn controls (Win32 and OS/2 only)
   --enable-uxtheme        enable support for Windows XP themed look (Win32 only)
   --enable-wxdib          use wxDIB class (Win32 only)
+  --enable-autoidman      use automatic ids management
   --disable-largefile     omit support for large files
   --disable-gtktest       do not try to compile and run a test GTK+ program
   --disable-gtktest       Do not try to compile and run a test GTK program
 echo "${ECHO_T}$result" >&6; }
 
 
+          enablestring=
+          defaultval=$wxUSE_ALL_FEATURES
+          if test -z "$defaultval"; then
+              if test x"$enablestring" = xdisable; then
+                  defaultval=yes
+              else
+                  defaultval=no
+              fi
+          fi
+
+          { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-autoidman" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-autoidman... $ECHO_C" >&6; }
+          # Check whether --enable-autoidman was given.
+if test "${enable_autoidman+set}" = set; then
+  enableval=$enable_autoidman;
+                          if test "$enableval" = yes; then
+                            wx_cv_use_autoidman='wxUSE_AUTOID_MANAGEMENT=yes'
+                          else
+                            wx_cv_use_autoidman='wxUSE_AUTOID_MANAGEMENT=no'
+                          fi
+
+else
+
+                          wx_cv_use_autoidman='wxUSE_AUTOID_MANAGEMENT=${'DEFAULT_wxUSE_AUTOID_MANAGEMENT":-$defaultval}"
+
+fi
+
+
+          eval "$wx_cv_use_autoidman"
+
+          if test x"$enablestring" = xdisable; then
+            if test $wxUSE_AUTOID_MANAGEMENT = yes; then
+              result=no
+            else
+              result=yes
+            fi
+          else
+            result=$wxUSE_AUTOID_MANAGEMENT
+          fi
+
+          { echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6; }
+
+
 fi
 
 
@@ -45855,6 +45900,12 @@ _ACEOF
 
 fi
 
+if test "$wxUSE_AUTOID_MANAGEMENT" = "yes"; then
+    cat >>confdefs.h <<\_ACEOF
+#define wxUSE_AUTOID_MANAGEMENT 1
+_ACEOF
+
+fi
 
 if test "$USE_WIN32" = 1 ; then
     if test "$wxUSE_INICONF" = "yes"; then
index dfe85db175c83e4d7adce25bbd2d512c8d202234..717eb78c23873651ef19d1c6988817689d391565 100644 (file)
@@ -917,6 +917,7 @@ WX_ARG_FEATURE(ps-in-msw,   [  --enable-ps-in-msw      use PS printing in wxMSW
 WX_ARG_FEATURE(ownerdrawn,  [  --enable-ownerdrawn     use owner drawn controls (Win32 and OS/2 only)], wxUSE_OWNER_DRAWN)
 WX_ARG_FEATURE(uxtheme,     [  --enable-uxtheme        enable support for Windows XP themed look (Win32 only)], wxUSE_UXTHEME)
 WX_ARG_FEATURE(wxdib,       [  --enable-wxdib          use wxDIB class (Win32 only)], wxUSE_DIB)
+WX_ARG_FEATURE(autoidman,   [  --enable-autoidman      use automatic ids management], wxUSE_AUTOID_MANAGEMENT)
 
 fi
 dnl for GUI only
@@ -6979,7 +6980,11 @@ if test "$wxUSE_MSW" = 1 ; then
 
 fi
 dnl wxUSE_MSW = 1
-    
+
+dnl not quite MSW-only although mostly useful to disable this under MSW
+if test "$wxUSE_AUTOID_MANAGEMENT" = "yes"; then
+    AC_DEFINE(wxUSE_AUTOID_MANAGEMENT)
+fi
 
 if test "$USE_WIN32" = 1 ; then
     if test "$wxUSE_INICONF" = "yes"; then
index 4d78cf7ffc9ea4763b08f95f5990eb016fae7528..c6aaa1fe396055295764cb529a734144884c8935 100644 (file)
@@ -1037,12 +1037,21 @@ public:
 
     // conversion to/from text: all conversions from text return the pointer to
     // the next character following the date specification (i.e. the one where
-    // the scan had to stop) or NULL on failure.
+    // the scan had to stop) or NULL on failure; for the versions returning
+    // iterators, end iterator is returned instead of NULL
     // ------------------------------------------------------------------------
 
         // parse a string in RFC 822 format (found e.g. in mail headers and
         // having the form "Wed, 10 Feb 1999 19:07:07 +0100")
-    const wxChar *ParseRfc822Date(const wxChar* date);
+    wxString::const_iterator ParseRfc822Date(const wxString& date);
+    const wchar_t *ParseRfc822Date(const wchar_t* date)
+    {
+    }
+
+    const char *ParseRfc822Date(const char* date)
+    {
+    }
+
         // parse a date/time in the given format (see strptime(3)), fill in
         // the missing (in the string) fields with the values of dateDef (by
         // default, they will not change if they had valid values or will
index 063106af0da894fbf0d3a453e743417ce803eb9c..6b0bd34b11b58ba008b638347c5570c8d0848edc 100644 (file)
 // long-running programs can run into problems with ids reuse without this. On
 // the other platforms, where the ids have the full int range, this shouldn't
 // be necessary.
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 1
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 // ----------------------------------------------------------------------------
 // common dialogs
index 4c6ad8d0e7fae762ba11f5df6172938aa30afda7..eceb8804416d82bc780a495d4ea20bf5fd18e05c 100644 (file)
 // long-running programs can run into problems with ids reuse without this. On
 // the other platforms, where the ids have the full int range, this shouldn't
 // be necessary.
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 1
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 // ----------------------------------------------------------------------------
 // common dialogs
index 17d09e4a58a0fa73a41c9aab64817d776142d496..66131ee64f476111846c8c19d341e643a427fdb8 100644 (file)
 // long-running programs can run into problems with ids reuse without this. On
 // the other platforms, where the ids have the full int range, this shouldn't
 // be necessary.
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 1
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 // ----------------------------------------------------------------------------
 // common dialogs
index a7e365f3d6fd133608e9827aa4eb73b0dce3c5c3..04d2d8164912102f7d8b842b763ebad15469aa86 100644 (file)
 // long-running programs can run into problems with ids reuse without this. On
 // the other platforms, where the ids have the full int range, this shouldn't
 // be necessary.
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 1
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 // ----------------------------------------------------------------------------
 // common dialogs
index 2099ba0fa104cbee33d5c0f2d6168b0dbe07c611..c8350fae1daf5e8e74bca4f65c2d4ebdae461420 100644 (file)
 // long-running programs can run into problems with ids reuse without this. On
 // the other platforms, where the ids have the full int range, this shouldn't
 // be necessary.
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 1
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 // ----------------------------------------------------------------------------
 // common dialogs
index 0988baa18d222157957a17d339380c1db72656fd..1dde2f6d1646fd1981233a03dd628fe243613b8c 100644 (file)
 // long-running programs can run into problems with ids reuse without this. On
 // the other platforms, where the ids have the full int range, this shouldn't
 // be necessary.
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 1
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 // ----------------------------------------------------------------------------
 // common dialogs
index 04f73575c29ce963a253a11204ed43cde717512c..500e3b10c0589d537864dd176851f752f505cd3f 100644 (file)
 // long-running programs can run into problems with ids reuse without this. On
 // the other platforms, where the ids have the full int range, this shouldn't
 // be necessary.
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 1
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 // ----------------------------------------------------------------------------
 // common dialogs
index e7defed624a2eceb1014f567e652f419c6ad6898..0108b6070bd61ee6fca744d5eb6f5204547d3fb5 100644 (file)
 
 #define wxUSE_VALIDATORS 0
 
-#define wxUSE_AUTOID_MANAGEMENT defined(__WXMSW__)
+#ifdef __WXMSW__
+#define wxUSE_AUTOID_MANAGEMENT 0
+#else
+#define wxUSE_AUTOID_MANAGEMENT 0
+#endif
 
 
 #define wxUSE_COMMON_DIALOGS 0