#ifdef __WXUNIVERSAL__
if ( !wxTheme::Get() && !wxTheme::CreateDefault() )
return FALSE;
- wxArtProvider *art = wxTheme::Get()->GetArtProvider();
- if ( art )
- wxArtProvider::PushProvider(art);
#endif // __WXUNIVERSAL__
return TRUE;
}
// iterate until the list becomes empty
- wxNode *node = wxPendingEvents->First();
+ wxNode *node = wxPendingEvents->GetFirst();
while (node)
{
- wxEvtHandler *handler = (wxEvtHandler *)node->Data();
+ wxEvtHandler *handler = (wxEvtHandler *)node->GetData();
delete node;
// In ProcessPendingEvents(), new handlers might be add
handler->ProcessPendingEvents();
wxENTER_CRIT_SECT( *wxPendingEventsLocker );
- node = wxPendingEvents->First();
+ node = wxPendingEvents->GetFirst();
}
wxLEAVE_CRIT_SECT( *wxPendingEventsLocker );
if ( !theme )
{
wxLogError(_("Unsupported theme '%s'."), themeName.c_str());
-
return FALSE;
}
+ // Delete the defaultly created theme and set the new theme.
+ delete wxTheme::Get();
wxTheme::Set(theme);
}
#endif // __WXUNIVERSAL__
if ( wxSscanf(modeDesc.c_str(), _T("%ux%u-%u"), &w, &h, &bpp) != 3 )
{
wxLogError(_("Invalid display mode specification '%s'."), modeDesc.c_str());
-
return FALSE;
}
static void LINKAGEMODE SetTraceMasks()
{
+#if wxUSE_LOG
wxString mask;
if ( wxGetEnv(wxT("WXTRACE"), &mask) )
{
while ( tkn.HasMoreTokens() )
wxLog::AddTraceMask(tkn.GetNextToken());
}
+#endif // wxUSE_LOG
}
// wxASSERT() helper