Quiet the warnings when overloaded on file watches
This commit is contained in:
parent
6c41354da5
commit
b9b19cb5fb
|
@ -1408,10 +1408,21 @@ void PROJECT_TREE_PANE::FileWatcherReset()
|
||||||
// see http://docs.wxwidgets.org/trunk/classwx_file_system_watcher.htm
|
// see http://docs.wxwidgets.org/trunk/classwx_file_system_watcher.htm
|
||||||
// under unix, the file watcher needs more work to be efficient
|
// under unix, the file watcher needs more work to be efficient
|
||||||
// moreover, under wxWidgets 2.9.4, AddTree does not work properly.
|
// moreover, under wxWidgets 2.9.4, AddTree does not work properly.
|
||||||
|
{
|
||||||
|
wxLogNull logNo; // avoid log messages
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
m_watcher->AddTree( fn );
|
if( ! m_watcher->AddTree( fn ) )
|
||||||
|
{
|
||||||
|
wxLogTrace( tracePathsAndFiles, "%s: failed to add '%s'\n", __func__, TO_UTF8( fn.GetFullPath() ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
m_watcher->Add( fn );
|
if( !m_watcher->Add( fn ) )
|
||||||
|
{
|
||||||
|
wxLogTrace( tracePathsAndFiles, "%s: failed to add '%s'\n", __func__, TO_UTF8( fn.GetFullPath() ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if( m_TreeProject->IsEmpty() )
|
if( m_TreeProject->IsEmpty() )
|
||||||
return;
|
return;
|
||||||
|
@ -1475,7 +1486,7 @@ void PROJECT_TREE_PANE::FileWatcherReset()
|
||||||
for( unsigned ii = 0; ii < paths.GetCount(); ii++ )
|
for( unsigned ii = 0; ii < paths.GetCount(); ii++ )
|
||||||
wxLogTrace( tracePathsAndFiles, " %s\n", TO_UTF8( paths[ii] ) );
|
wxLogTrace( tracePathsAndFiles, " %s\n", TO_UTF8( paths[ii] ) );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PROJECT_TREE_PANE::EmptyTreePrj()
|
void PROJECT_TREE_PANE::EmptyTreePrj()
|
||||||
|
|
Loading…
Reference in New Issue