Use wxDEBUG_LEVEL instead of __WXDEBUG__ in wxInfoMessageBox().
Also disable sizer-drawing code unless wxDEBUG_LEVEL>=2 as we don't want it to be available in production versions. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61888 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1314,37 +1314,37 @@ void wxInfoMessageBox(wxWindow* parent)
|
|||||||
{
|
{
|
||||||
// don't translate these strings, they're for diagnostics purposes only
|
// don't translate these strings, they're for diagnostics purposes only
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf(wxT("wxWidgets Library (%s port)\n")
|
msg.Printf(wxS("wxWidgets Library (%s port)\n")
|
||||||
wxT("Version %d.%d.%d%s%s, compiled at %s %s\n")
|
wxS("Version %d.%d.%d (Unicode: %s, debug level: %d),\n")
|
||||||
wxT("Runtime version of toolkit used is %d.%d.%s\n")
|
wxS("compiled at %s %s\n\n")
|
||||||
wxT("Copyright (c) 1995-2009 wxWidgets team"),
|
wxS("Runtime version of toolkit used is %d.%d.\n"),
|
||||||
wxPlatformInfo::Get().GetPortIdName().c_str(),
|
wxPlatformInfo::Get().GetPortIdName(),
|
||||||
wxMAJOR_VERSION,
|
wxMAJOR_VERSION,
|
||||||
wxMINOR_VERSION,
|
wxMINOR_VERSION,
|
||||||
wxRELEASE_NUMBER,
|
wxRELEASE_NUMBER,
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE_UTF8
|
||||||
L" (Unicode)",
|
"UTF-8",
|
||||||
|
#elif wxUSE_UNICODE
|
||||||
|
"wchar_t",
|
||||||
#else
|
#else
|
||||||
wxEmptyString,
|
"none",
|
||||||
#endif
|
|
||||||
#ifdef __WXDEBUG__
|
|
||||||
wxT(" Debug build"),
|
|
||||||
#else
|
|
||||||
wxEmptyString,
|
|
||||||
#endif
|
#endif
|
||||||
|
wxDEBUG_LEVEL,
|
||||||
__TDATE__,
|
__TDATE__,
|
||||||
__TTIME__,
|
__TTIME__,
|
||||||
wxPlatformInfo::Get().GetToolkitMajorVersion(),
|
wxPlatformInfo::Get().GetToolkitMajorVersion(),
|
||||||
wxPlatformInfo::Get().GetToolkitMinorVersion(),
|
wxPlatformInfo::Get().GetToolkitMinorVersion()
|
||||||
|
);
|
||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
wxString::Format("\nThe compile-time GTK+ version is %d.%d.%d.",
|
msg += wxString::Format("Compile-time GTK+ version is %d.%d.%d.\n",
|
||||||
GTK_MAJOR_VERSION,
|
GTK_MAJOR_VERSION,
|
||||||
GTK_MINOR_VERSION,
|
GTK_MINOR_VERSION,
|
||||||
GTK_MICRO_VERSION).c_str()
|
GTK_MICRO_VERSION);
|
||||||
#else
|
#endif // __WXGTK__
|
||||||
wxEmptyString
|
|
||||||
#endif
|
msg += wxS("\nCopyright (c) 1995-2009 wxWidgets team");
|
||||||
);
|
|
||||||
wxMessageBox(msg, wxT("wxWidgets information"),
|
wxMessageBox(msg, wxT("wxWidgets information"),
|
||||||
wxICON_INFORMATION | wxOK,
|
wxICON_INFORMATION | wxOK,
|
||||||
parent);
|
parent);
|
||||||
|
@@ -2558,8 +2558,11 @@ wxWindowBase::DoGetPopupMenuSelectionFromUser(wxMenu& menu, int x, int y)
|
|||||||
|
|
||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
// methods for drawing the sizers in a visible way
|
// methods for drawing the sizers in a visible way: this is currently only
|
||||||
#ifdef __WXDEBUG__
|
// enabled for "full debug" builds with wxDEBUG_LEVEL==2 as it doesn't work
|
||||||
|
// that well and also because we don't want to leave it enabled in default
|
||||||
|
// builds used for production
|
||||||
|
#if wxDEBUG_LEVEL > 1
|
||||||
|
|
||||||
static void DrawSizers(wxWindowBase *win);
|
static void DrawSizers(wxWindowBase *win);
|
||||||
|
|
||||||
@@ -2641,22 +2644,25 @@ static void DrawSizers(wxWindowBase *win)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __WXDEBUG__
|
#endif // wxDEBUG_LEVEL
|
||||||
|
|
||||||
// process special middle clicks
|
// process special middle clicks
|
||||||
void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
|
void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
|
||||||
{
|
{
|
||||||
if ( event.ControlDown() && event.AltDown() )
|
if ( event.ControlDown() && event.AltDown() )
|
||||||
{
|
{
|
||||||
#ifdef __WXDEBUG__
|
#if wxDEBUG_LEVEL > 1
|
||||||
// Ctrl-Alt-Shift-mclick makes the sizers visible in debug builds
|
// Ctrl-Alt-Shift-mclick makes the sizers visible in debug builds
|
||||||
if ( event.ShiftDown() )
|
if ( event.ShiftDown() )
|
||||||
{
|
{
|
||||||
DrawSizers(this);
|
DrawSizers(this);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif // __WXDEBUG__
|
#endif // __WXDEBUG__
|
||||||
::wxInfoMessageBox((wxWindow*)this);
|
{
|
||||||
|
// just Ctrl-Alt-middle click shows information about wx version
|
||||||
|
::wxInfoMessageBox((wxWindow*)this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user