Commit Graph

190 Commits

Author SHA1 Message Date
Václav Slavík
e0a050e347 more changes to make wx compile without implicit wxString->char* conversion (for STL build)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-20 07:44:45 +00:00
Václav Slavík
cb296f303e compilation fix for non-STL build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-19 16:06:26 +00:00
Václav Slavík
d993e05b2d wxLog::Get/Settimestamp() now use wxString
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-19 14:51:10 +00:00
Vadim Zeitlin
5d88a6b579 added wxDEPRECATED_BUT_USED_INTERNALLY macro and use it for the old wxLog::DoLog() overloads
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-15 15:08:51 +00:00
Václav Slavík
3a3dde0d44 use wx/crt.h as the 'official' header for wxCRT wrappers instead of wxchar.h; add comments explaining that users should include wx/crt.h to implementation headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-11 06:08:13 +00:00
Václav Slavík
5a20d2ced0 changed wxLog::OnLog(String) to take wxString instead of wxChar* to avoid unnecessary conversions; added compatibility code so that user code overriding these with char* or wchar_t* argument continues to work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-04 10:04:05 +00:00
David Elliott
e94cd97dd7 Add a wxLog::DoCreateOnDemand and call it from DoCommonPreInit so that
logging will work even if wxWidgets is reentered after being cleaned up.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-18 21:17:06 +00:00
Václav Slavík
59a14f6984 fix compation with Watcom after latest vararg templates changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-06 14:11:14 +00:00
Václav Slavík
8bd37efca7 fixed reverted #if condition around wxDoLogTraceWchar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-03 13:21:54 +00:00
Václav Slavík
d1f6e2cfe2 fixed vararg functions with format argument to not use wxString or reference argument (the latter is invalid C++, the former doesn't work with Watcom and produces at least warnings with GCC 3.3)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-03 10:50:25 +00:00
Václav Slavík
2523e9b700 use UTF8-encoded char* strings in UTF8 build instead of wchar_t* if the current locale uses UTF8;
fall back to widechar CRT functions in the locale is not UTF8


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-26 11:40:04 +00:00
Václav Slavík
817270659e initial version of UTF-8 strings representation (still converting to wchar_t* a lot); it has to be explicitly enabled with --enable-utf8 for now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-12 21:15:07 +00:00
Václav Slavík
c9f7896861 first phase of transition to unified Unicode build:
1. changed c_str() to return wxCStrData (implicitly convertible to wxChar*)
2. added template type-safe wrappers for vararg functions
3. added wxUniChar class representing single Unicode character
4. changed wxString::operator[] and wxString::iterator to return wxUniChar


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-17 10:26:10 +00:00
Paul Cornett
61d8dec77f static functions don't need an instance
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-07 09:00:52 +00:00
Vadim Zeitlin
14ff7a5992 use wxFputs(s) instead of puts(s.mb_str()) to avoid crashes when conversion fails (see bug 1591388)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43376 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-12 21:52:46 +00:00
Vadim Zeitlin
7b2d1c74fe include wx/datetime.h and test for wxUSE_DATETIME before using wxLocaltime_r()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43078 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-04 23:46:02 +00:00
Vadim Zeitlin
83e8b44cc0 use wxLocaltime_r() instead of localtime(): this is safer and localtime() isn't available under WinCE while wxLocaltime_r() is always available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43075 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-04 23:20:20 +00:00
Vadim Zeitlin
dcc40ba510 compilation fix for WXWIN_COMPATIBILITY_2_6==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-01 12:46:17 +00:00
Vadim Zeitlin
2e7f384517 don't use static buffer needing a critical section to protect it for logging; this results in deadlocks if the log sink decides to log itself (and this can be very difficult to prevent) and is unnecessary anyhow as the initial goal of allowing wxLog to work even for out of memory errors has never been tested and presumably never worked
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-31 11:31:02 +00:00
Włodzimierz Skiba
459b97dfcb Allow wxUSE_INTL==0 builds.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40314 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 09:08:46 +00:00
Vadim Zeitlin
374b4f1c0b compilation fix for platforms where size_t is unsigned long, not int
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 01:05:49 +00:00
Vadim Zeitlin
f98377912b optionally count repeating wxLog messages instead of logging all (patch 1520815)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40294 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-07-25 00:04:35 +00:00
Vadim Zeitlin
65f0638484 flush stderr in wxSafeShowMessage(): this might be unnecessary but definitely doesn't hurt and could be useful if stderr is redirected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-29 12:42:06 +00:00
Vadim Zeitlin
d68d85908b removed wxIsLoggingEnabled() as it could create the log target as an unwanted side effect and just use wxLog::IsEnabled() instead
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-06 18:48:48 +00:00
Vadim Zeitlin
41f44cca0a typo: PrintfInLogBug() was probably supposed to be called PrintfInLogBuf()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-06 18:45:13 +00:00
Włodzimierz Skiba
de6185e212 Include wx/utils.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-02 10:39:23 +00:00
Włodzimierz Skiba
e4db172a3b Include wx/log.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-04-26 08:21:31 +00:00
Julian Smart
416f976440 Applied patch [ 1334242 ] wxLogStream::DoLogString fix for unicode builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-01-18 13:20:40 +00:00
Mart Raudsepp
8907154c1a Nuke #pragma implementation/interface's
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35650 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-09-23 12:56:45 +00:00
Włodzimierz Skiba
7448de8d8d [1231183] 'cleanup: mismatched indentation' and other cleanings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-22 17:08:42 +00:00
Włodzimierz Skiba
c4b401b664 Visible wxMessageOutputDebug instance.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-07-04 11:26:08 +00:00
Vadim Zeitlin
83250f1a2b don't show wxLogDebug during app startup output in msg box
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-17 11:45:25 +00:00
Vadim Zeitlin
a23bbe9364 don't do anything in wxLogBuffer::Flush() if there are no messages (patch 1216159)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34563 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-07 12:05:40 +00:00
Vadim Zeitlin
d3fc175515 added wxLogBuffer which collects all log messages in a string buffer
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-06 23:35:40 +00:00
Vadim Zeitlin
d0822e56c6 don't crash if FormatMessage() fails in wxSysErrorMsg()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-06-06 22:05:16 +00:00
Julian Smart
2a1f999faf Applied patch [ 1171542 ] access static class members via scoping operator
Paul Cornett: A static class member can be accessed as X::member,
there is no need for an object or pointer (s.member or
p->member). There are also a few bugs with incorrect
usage of wxString::Format and wxString::FromAscii.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-03-30 16:49:41 +00:00
Julian Smart
30413fd03e Added missing newline for Windows debug output
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30817 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-11-30 16:55:42 +00:00
Włodzimierz Skiba
ecd9653bf3 Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29813 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-12 19:29:12 +00:00
Włodzimierz Skiba
254a21292b Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-10-05 15:38:40 +00:00
Włodzimierz Skiba
0c44ec9737 Hardware defines spec.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-28 17:13:15 +00:00
Włodzimierz Skiba
f644b28c11 Source cleaning: whitespaces, -1/wxID_ANY/wxNOT_FOUND, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-09-17 17:57:44 +00:00
Vadim Zeitlin
b765da9f50 reverted previous patch applied by mistake
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-25 17:21:42 +00:00
Vadim Zeitlin
22dec51f90 fixed flushing of secondary log target in wxLogChain (patch 985711)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-25 16:02:54 +00:00
Vadim Zeitlin
5e475383d8 fixed a warning about unusable code in release build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-07-09 21:19:00 +00:00
Julian Smart
a9928e9d1a WinCE Standard SDK improvements including adding close button
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-27 11:31:12 +00:00
Julian Smart
655719367a Use old licence name
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 20:53:33 +00:00
Julian Smart
77ffb5937e Name and version changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-05-23 14:56:36 +00:00
Vadim Zeitlin
3a5bcc4db0 removed Win16 code (patch 905241), last version with remains of Win16 support tagged with BEFORE_WIN16_REMOVAL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2004-03-28 13:10:14 +00:00
Václav Slavík
14f355c2b5 added support for gcc precompiled headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-08-09 12:46:53 +00:00
Julian Smart
1c193821a9 More WinCE mods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-11 11:21:47 +00:00