// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "module.h"
#endif
#include "wx/module.h"
#include "wx/hash.h"
+#include "wx/intl.h"
+#include "wx/log.h"
#include "wx/listimpl.cpp"
WX_DEFINE_LIST(wxModuleList);
{
classInfo = (wxClassInfo *)node->GetData();
if ( classInfo->IsKindOf(CLASSINFO(wxModule)) &&
- (classInfo != (& (wxModule::sm_classwxModule))) )
+ (classInfo != (& (wxModule::ms_classInfo))) )
{
wxModule* module = (wxModule *)classInfo->CreateObject();
RegisterModule(module);
wxModuleList::compatibility_iterator node;
for ( node = m_modules.GetFirst(); node; node = node->GetNext() )
{
- if ( !node->GetData()->Init() )
+ wxModule *module = node->GetData();
+ if ( !module->Init() )
{
+ wxLogError(_("Module \"%s\" initialization failed"),
+ module->GetClassInfo()->GetClassName());
+
// clean up already initialized modules - process in reverse order
wxModuleList::compatibility_iterator n;
for ( n = node->GetPrevious(); n; n = n->GetPrevious() )
n->GetData()->OnExit();
}
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
void wxModule::CleanUpModules()