// we can't simply double-click on the error message and get to that
// line in the source. So VC++ at least, let's have a sensible default.
#ifdef __VISUALC__
+#if wxUSE_LOG
wxLog::SetTimestamp(NULL);
-#endif
+#endif // wxUSE_LOG
+#endif // __VISUALC__
// init the app
int retValue = wxEntryInitGui() && wxTheApp->OnInit() ? 0 : -1;
// Send idle event to window and all subwindows
bool wxApp::SendIdleEvents(wxWindow* win)
{
- bool needMore = FALSE;
-
wxIdleEvent event;
event.SetEventObject(win);
win->GetEventHandler()->ProcessEvent(event);
- if (event.MoreRequested())
- needMore = TRUE;
+ bool needMore = event.MoreRequested();
- wxNode* node = win->GetChildren().First();
- while (node)
+ wxWindowList::Node *node = win->GetChildren().GetFirst();
+ while ( node )
{
- wxWindow* win = (wxWindow*) node->Data();
+ wxWindow *win = node->GetData();
if (SendIdleEvents(win))
needMore = TRUE;
- node = node->Next();
+ node = node->GetNext();
}
+
return needMore;
}
void wxApp::DeletePendingObjects()
{
- wxNode *node = wxPendingDelete.First();
+ wxNode *node = wxPendingDelete.GetFirst();
while (node)
{
- wxObject *obj = (wxObject *)node->Data();
+ wxObject *obj = node->GetData();
delete obj;
// Deleting one object may have deleted other pending
// objects, so start from beginning of list again.
- node = wxPendingDelete.First();
+ node = wxPendingDelete.GetFirst();
}
}
// MT-FIXME
static bool s_inYield = FALSE;
+#if wxUSE_LOG
// disable log flushing from here because a call to wxYield() shouldn't
// normally result in message boxes popping up &c
wxLog::Suspend();
+#endif // wxUSE_LOG
if ( s_inYield )
{
// if there are pending events, we must process them.
ProcessPendingEvents();
+#if wxUSE_LOG
// let the logs be flashed again
wxLog::Resume();
+#endif // wxUSE_LOG
s_inYield = FALSE;