minor change: disable debug messages flood from OnDragOver

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-10-21 18:04:20 +00:00
parent c9057ae1c5
commit 2edc8f5bd6
2 changed files with 60 additions and 48 deletions

View File

@@ -373,8 +373,13 @@ wxDragResult wxDropTarget::OnDragOver( wxCoord WXUNUSED(x),
wxCoord WXUNUSED(y), wxCoord WXUNUSED(y),
wxDragResult def ) wxDragResult def )
{ {
if (!m_dataObject) // GetMatchingPair() checks for m_dataObject too, no need to do it here
return FALSE;
// disable the debug message from GetMatchingPair() - there are too many
// of them otherwise
#ifdef __WXDEBUG__
wxLogNull noLog;
#endif // Debug
return (GetMatchingPair() != (GdkAtom) 0) ? def : wxDragNone; return (GetMatchingPair() != (GdkAtom) 0) ? def : wxDragNone;
} }
@@ -414,8 +419,9 @@ GdkAtom wxDropTarget::GetMatchingPair()
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
char *name = gdk_atom_name( formatAtom ); char *name = gdk_atom_name( formatAtom );
if (name) wxLogDebug( "Drop target: drag has format: %s", name ); wxLogDebug("Drop target: drag has format: %s", name ? name : "unnamed");
#endif #endif // Debug
if (m_dataObject->IsSupportedFormat( format )) if (m_dataObject->IsSupportedFormat( format ))
return formatAtom; return formatAtom;

View File

@@ -373,8 +373,13 @@ wxDragResult wxDropTarget::OnDragOver( wxCoord WXUNUSED(x),
wxCoord WXUNUSED(y), wxCoord WXUNUSED(y),
wxDragResult def ) wxDragResult def )
{ {
if (!m_dataObject) // GetMatchingPair() checks for m_dataObject too, no need to do it here
return FALSE;
// disable the debug message from GetMatchingPair() - there are too many
// of them otherwise
#ifdef __WXDEBUG__
wxLogNull noLog;
#endif // Debug
return (GetMatchingPair() != (GdkAtom) 0) ? def : wxDragNone; return (GetMatchingPair() != (GdkAtom) 0) ? def : wxDragNone;
} }
@@ -414,8 +419,9 @@ GdkAtom wxDropTarget::GetMatchingPair()
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
char *name = gdk_atom_name( formatAtom ); char *name = gdk_atom_name( formatAtom );
if (name) wxLogDebug( "Drop target: drag has format: %s", name ); wxLogDebug("Drop target: drag has format: %s", name ? name : "unnamed");
#endif #endif // Debug
if (m_dataObject->IsSupportedFormat( format )) if (m_dataObject->IsSupportedFormat( format ))
return formatAtom; return formatAtom;