Mention wxMessageOutput in changes.txt
wxMessageOutputLog now available in all ports git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16357 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -96,6 +96,10 @@ All (GUI):
|
|||||||
for example, use wxScrolledWindow::GetViewStart() now instead of ViewStart()
|
for example, use wxScrolledWindow::GetViewStart() now instead of ViewStart()
|
||||||
and GetCount() instead of Number() in many classes
|
and GetCount() instead of Number() in many classes
|
||||||
|
|
||||||
|
- wxCmdLineParser does not use wxLog to output messages anymore.
|
||||||
|
to obtain the previous behaviour, add
|
||||||
|
wxMessageOutput::Set(new wxMessageOutputLog); to your program
|
||||||
|
(you will need to #include <wx/msgout.h>)
|
||||||
|
|
||||||
wxMSW:
|
wxMSW:
|
||||||
|
|
||||||
|
@@ -58,10 +58,8 @@ public:
|
|||||||
virtual void Printf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
|
virtual void Printf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __WXMOTIF__
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
// use wxLog; this is only required for wxMotif, so we put this code
|
|
||||||
// inside wxUSE_GUI; it will work even without GUI
|
|
||||||
class WXDLLEXPORT wxMessageOutputLog : public wxMessageOutput
|
class WXDLLEXPORT wxMessageOutputLog : public wxMessageOutput
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -70,9 +68,5 @@ public:
|
|||||||
virtual void Printf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
|
virtual void Printf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __WXMOTIF__
|
|
||||||
|
|
||||||
#endif // wxUSE_GUI
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_MSGOUT_H_
|
// _WX_MSGOUT_H_
|
||||||
|
@@ -113,8 +113,6 @@ void wxMessageOutputMessageBox::Printf(const wxChar* format, ...)
|
|||||||
// wxMessageOutputLog
|
// wxMessageOutputLog
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxUSE_GUI && defined(__WXMOTIF__)
|
|
||||||
|
|
||||||
void wxMessageOutputLog::Printf(const wxChar* format, ...)
|
void wxMessageOutputLog::Printf(const wxChar* format, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -129,5 +127,3 @@ void wxMessageOutputLog::Printf(const wxChar* format, ...)
|
|||||||
// wxLog, which is better than nothing
|
// wxLog, which is better than nothing
|
||||||
::wxLogMessage("%s", out.c_str());
|
::wxLogMessage("%s", out.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_GUI
|
|
||||||
|
Reference in New Issue
Block a user