1) minor modifications in fileconf.cpp

2) new MSW function (private.h): wxGetWindowText() which works with wxString
   instead of (horror) fixed size buffers. All calls to ::GetWindowText()
   should be replaced with this!
3) remains of casts to float in different wxControl classes removed,
   (EDIT|BUTTON)_HEIGHT_FROM_CHAR_HEIGHT macros introduced (could be
   made inline functions as well...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-09-20 21:13:46 +00:00
parent 803bf1c581
commit 1c4a764c98
11 changed files with 111 additions and 90 deletions

View File

@@ -268,8 +268,9 @@ wxLog *wxLog::GetActiveTarget()
wxLog *wxLog::SetActiveTarget(wxLog *pLogger, bool bNoFlashOld)
{
// flush the old messages before changing
if ( (ms_pLogger != NULL) && !bNoFlashOld )
if ( (ms_pLogger != NULL) && !bNoFlashOld ) {
ms_pLogger->Flush();
}
wxLog *pOldLogger = ms_pLogger;
ms_pLogger = pLogger;
@@ -737,13 +738,29 @@ void wxLogWindow::DoLog(wxLogLevel level, const char *szString)
((wxLogWindow *)m_pOldLog)->DoLog(level, szString);
}
// don't put trace messages in the text window for 2 reasons:
// 1) there are too many of them
// 2) they may provoke other trace messages thus sending a program into an
// infinite loop
if ( m_pLogFrame && level != wxLOG_Trace ) {
// and this will format it nicely and call our DoLogString()
wxLog::DoLog(level, szString);
if ( m_pLogFrame ) {
switch ( level ) {
case wxLOG_Status:
// by default, these messages are ignored by wxLog, so process
// them ourselves
{
wxString str = TimeStamp();
str << _("Status: ") << szString;
DoLogString(str);
}
break;
// don't put trace messages in the text window for 2 reasons:
// 1) there are too many of them
// 2) they may provoke other trace messages thus sending a program
// into an infinite loop
case wxLOG_Trace:
break;
default:
// and this will format it nicely and call our DoLogString()
wxLog::DoLog(level, szString);
}
}
m_bHasMessages = TRUE;