X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..642067e02a202feddc97255f1229e4e7378541d9:/src/common/appcmn.cpp?ds=sidebyside diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 32c2fe5e00..e22ebf4a33 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -121,9 +121,6 @@ bool wxAppBase::OnInitGui() #ifdef __WXUNIVERSAL__ if ( !wxTheme::Get() && !wxTheme::CreateDefault() ) return FALSE; - wxArtProvider *art = wxTheme::Get()->GetArtProvider(); - if ( art ) - wxArtProvider::PushProvider(art); #endif // __WXUNIVERSAL__ return TRUE; @@ -215,10 +212,10 @@ void wxAppBase::ProcessPendingEvents() } // 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 @@ -227,7 +224,7 @@ void wxAppBase::ProcessPendingEvents() handler->ProcessPendingEvents(); wxENTER_CRIT_SECT( *wxPendingEventsLocker ); - node = wxPendingEvents->First(); + node = wxPendingEvents->GetFirst(); } wxLEAVE_CRIT_SECT( *wxPendingEventsLocker ); @@ -381,10 +378,11 @@ bool wxAppBase::OnCmdLineParsed(wxCmdLineParser& parser) 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__ @@ -397,7 +395,6 @@ bool wxAppBase::OnCmdLineParsed(wxCmdLineParser& parser) if ( wxSscanf(modeDesc.c_str(), _T("%ux%u-%u"), &w, &h, &bpp) != 3 ) { wxLogError(_("Invalid display mode specification '%s'."), modeDesc.c_str()); - return FALSE; } @@ -476,6 +473,7 @@ bool wxAppBase::CheckBuildOptions(const wxBuildOptions& opts) static void LINKAGEMODE SetTraceMasks() { +#if wxUSE_LOG wxString mask; if ( wxGetEnv(wxT("WXTRACE"), &mask) ) { @@ -483,6 +481,7 @@ static void LINKAGEMODE SetTraceMasks() while ( tkn.HasMoreTokens() ) wxLog::AddTraceMask(tkn.GetNextToken()); } +#endif // wxUSE_LOG } // wxASSERT() helper