]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxLog::DisableTimestamp() to be used as a synonym for SetTimestamp(wxEmptyString)
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Jun 2007 12:09:55 +0000 (12:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 27 Jun 2007 12:09:55 +0000 (12:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/changes.txt
docs/latex/wx/log.tex
include/wx/log.h
samples/grid/griddemo.cpp

index f60b16039c3e6a8342e2f396170d4d0af279227b..3973da57d99e6aaadf7e942f6c9293baa68512c6 100644 (file)
@@ -71,9 +71,12 @@ Changes in behaviour which may result in compilation errors
 
 - virtual wxHtmlParser::AddText() takes wxString, not wxChar*, argument now.
 
-- Funtions that took wxChar* arguments that could by NULL in wxWidgets 2.8.
+- Functions that took wxChar* arguments that could by NULL in wxWidgets 2.8.
   are deprecated and passing NULL to them won't compile anymore, wxEmptyString
-  must be used instead.
+  must be used instead. In some cases new functions can be used too, e.g.:
+    * use wxLog::DisableTimestamp() instead of wxLog::SetTimestamp(NULL)
+    * wxUnsetEnv(var) instead of wxSetEnv(var, NULL)
+
 
 Deprecated methods and their replacements
 -----------------------------------------
index ae311235b433a7fdb94435ada0f4c40a5150a72d..7fb5832297e5e99afcbcf7c88b6f7628edd21582 100644 (file)
@@ -341,16 +341,24 @@ Returns whether the repetition counting mode is enabled.
 
 \membersection{wxLog::SetTimestamp}\label{wxlogsettimestamp}
 
-\func{void}{SetTimestamp}{\param{const wxStrgin\&}{ format}}
+\func{static void}{SetTimestamp}{\param{const wxString\&}{ format}}
 
 Sets the timestamp format prepended by the default log targets to all
 messages. The string may contain any normal characters as well as \%
 prefixed format specificators, see {\it strftime()} manual for details.
-Passing a NULL value (not empty string) to this function disables message timestamping.
+Passing an empty string to this function disables message time stamping.
+
+\membersection{wxLog::DisableTimestamp}\label{wxlogdisabletimestamp}
+
+\func{void}{SetTimestamp}{\param{const wxString\&}{ format}}
+
+Disables time stamping of the log messages.
+
+\newsince{2.9}
 
 \membersection{wxLog::GetTimestamp}\label{wxloggettimestamp}
 
-\constfunc{const wxString\&}{GetTimestamp}{\void}
+\func{static const wxString\&}{GetTimestamp}{\void}
 
 Returns the current timestamp format string.
 
@@ -363,6 +371,8 @@ section for details.
 
 \membersection{wxLog::GetTraceMask}\label{wxloggettracemask}
 
+\func{static wxTraceMask}{GetTraceMask}{\void}
+
 Returns the current trace mask, see \helpref{Customization}{wxlogcustomization} section
 for details.
 
index de2b9b817a8d19ce26c71df284a0403e76e759c7..9166b7ee502f830dccd7b29bd8a79a3c06803e87 100644 (file)
@@ -208,11 +208,14 @@ public:
     // get string trace masks
     static const wxArrayString &GetTraceMasks() { return ms_aTraceMasks; }
 
-    // sets the timestamp string: this is used as strftime() format string
-    // for the log targets which add time stamps to the messages - set it
-    // to NULL to disable time stamping completely.
+    // sets the time stamp string format: this is used as strftime() format
+    // string for the log targets which add time stamps to the messages; set
+    // it to empty string to disable time stamping completely.
     static void SetTimestamp(const wxString& ts) { ms_timestamp = ts; }
 
+    // disable time stamping of log messages
+    static void DisableTimestamp() { SetTimestamp(wxEmptyString); }
+
 
     // accessors
 
index d6ceb21e3bbf32a5a5b3696441c3149ff3c0a951..ad992afb47b50651b6a3ced8b9532fddf83ea401 100644 (file)
@@ -266,7 +266,7 @@ GridFrame::GridFrame()
 
     logger = new wxLogTextCtrl( logWin );
     m_logOld = wxLog::SetActiveTarget( logger );
-    wxLog::SetTimestamp( NULL );
+    wxLog::DisableTimestamp();
 #endif // wxUSE_LOG
 
     // this will create a grid and, by default, an associated grid