diff --git a/build b/build index fbdf5614..8fd16ebb 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit fbdf561438abd90fc713b6395d56784a33a76067 +Subproject commit 8fd16ebb053e581abae3d839b06bce63ffa69ab3 diff --git a/external/egami b/external/egami index 48f276df..a2ec749e 160000 --- a/external/egami +++ b/external/egami @@ -1 +1 @@ -Subproject commit 48f276df25855e091535c14639eb45b22e15acdb +Subproject commit a2ec749e8e34a40de57c714117dbaa4d0272de11 diff --git a/external/ege b/external/ege index c213ebb3..7f28ae22 160000 --- a/external/ege +++ b/external/ege @@ -1 +1 @@ -Subproject commit c213ebb32b1379fc601ef8ee9adcecebb15ea04d +Subproject commit 7f28ae22f21f223ff8f6776af70189f86ae715a8 diff --git a/sources/ewol/renderer/ConfigFont.cpp b/sources/ewol/renderer/ConfigFont.cpp index 414707f5..0025975a 100644 --- a/sources/ewol/renderer/ConfigFont.cpp +++ b/sources/ewol/renderer/ConfigFont.cpp @@ -13,7 +13,7 @@ #define __class__ "ConfigFont" ewol::ConfigFont::ConfigFont(void) : - m_folder("DATA::fonts"), + m_folder("DATA:fonts"), m_name("Arial;Helvetica"), m_size(10), m_useExternal(false) diff --git a/sources/ewol/renderer/EObjectManager.cpp b/sources/ewol/renderer/EObjectManager.cpp index 4427fc5d..f3afb04b 100644 --- a/sources/ewol/renderer/EObjectManager.cpp +++ b/sources/ewol/renderer/EObjectManager.cpp @@ -22,6 +22,22 @@ ewol::EObjectManager::EObjectManager(void) } ewol::EObjectManager::~EObjectManager(void) +{ + bool hasError = false; + if (m_eObjectAutoRemoveList.Size()!=0) { + EWOL_ERROR("Must not have anymore eObject to auto-remove !!!"); + hasError = true; + } + if (m_eObjectList.Size()!=0) { + EWOL_ERROR("Must not have anymore eObject !!!"); + hasError = true; + } + if (true==hasError) { + EWOL_ERROR("Check if the function UnInit has been called !!!"); + } +} + +void ewol::EObjectManager::UnInit(void) { EWOL_DEBUG("==> Un-Init EObject-Manager"); RemoveAllAutoRemove(); diff --git a/sources/ewol/renderer/EObjectManager.h b/sources/ewol/renderer/EObjectManager.h index 0dec4cff..184032dc 100644 --- a/sources/ewol/renderer/EObjectManager.h +++ b/sources/ewol/renderer/EObjectManager.h @@ -23,6 +23,11 @@ namespace ewol public: EObjectManager(void); ~EObjectManager(void); + /** + * @brief remove all resources (un-init) out of the destructor (due to the system implementation) + */ + void UnInit(void); + void Add(ewol::EObject* _object); void Rm(ewol::EObject* _object); int32_t GetNumberObject(void); diff --git a/sources/ewol/renderer/eContext.cpp b/sources/ewol/renderer/eContext.cpp index b11ffeb4..6286bd94 100644 --- a/sources/ewol/renderer/eContext.cpp +++ b/sources/ewol/renderer/eContext.cpp @@ -296,6 +296,9 @@ ewol::eContext::~eContext(void) // unset all windows m_windowsCurrent = NULL; m_msgSystem.Clean(); + + m_EObjectManager.UnInit(); + m_resourceManager.UnInit(); // release the curent interface : UnLockContext(); EWOL_INFO("==> Ewol System Un-Init (END)"); @@ -505,12 +508,13 @@ bool ewol::eContext::OS_Draw(bool _displayEveryTime) return hasDisplayDone; } -/* -void ewol::eContext::OnObjectRemove(ewol::EObject * removeObject) + +void ewol::eContext::OnObjectRemove(ewol::EObject * _removeObject) { - m_managementInput.OnObjectRemove(removeObject); + //EWOL_CRITICAL("element removed"); + m_input.OnObjectRemove(_removeObject); } -*/ + void ewol::eContext::ResetIOEvent(void) { diff --git a/sources/ewol/renderer/eContext.h b/sources/ewol/renderer/eContext.h index 029eff9b..a64bc0d6 100644 --- a/sources/ewol/renderer/eContext.h +++ b/sources/ewol/renderer/eContext.h @@ -162,9 +162,7 @@ namespace ewol * @param[in] removeObject Pointer on the EObject removed ==> the user must remove all reference on this EObject * @note : Sub classes must call this class */ - void OnObjectRemove(ewol::EObject * removeObject) { - // TODO : I did not remember what I must do ... - }; + void OnObjectRemove(ewol::EObject * removeObject); /** * @brief reset event management for the IO like Input ou Mouse or keyborad */ diff --git a/sources/ewol/resources/ResourceManager.cpp b/sources/ewol/resources/ResourceManager.cpp index 3525a451..e6051d0a 100644 --- a/sources/ewol/resources/ResourceManager.cpp +++ b/sources/ewol/resources/ResourceManager.cpp @@ -27,6 +27,21 @@ ewol::ResourceManager::ResourceManager(void) : } ewol::ResourceManager::~ResourceManager(void) +{ + bool hasError = false; + if (m_resourceListToUpdate.Size()!=0) { + EWOL_ERROR("Must not have anymore resources to update !!!"); + hasError = true; + } + if (m_resourceList.Size()!=0) { + EWOL_ERROR("Must not have anymore resources !!!"); + hasError = true; + } + if (true==hasError) { + EWOL_ERROR("Check if the function UnInit has been called !!!"); + } +} +void ewol::ResourceManager::UnInit(void) { Display(); m_resourceListToUpdate.Clear(); @@ -43,6 +58,7 @@ ewol::ResourceManager::~ResourceManager(void) m_resourceList.Clear(); } + void ewol::ResourceManager::Display(void) { EWOL_INFO("Resources loaded : "); diff --git a/sources/ewol/resources/ResourceManager.h b/sources/ewol/resources/ResourceManager.h index 6a7aa1b8..89cc2794 100644 --- a/sources/ewol/resources/ResourceManager.h +++ b/sources/ewol/resources/ResourceManager.h @@ -40,6 +40,10 @@ namespace ewol * @note when not free ==> generate warning, because the segfault can appear after... */ ~ResourceManager(void); + /** + * @brief remove all resources (un-init) out of the destructor (due to the system implementation) + */ + void UnInit(void); /** * @brief Display in the log all the resources loaded ... */ diff --git a/sources/ewol/widget/WidgetManager.cpp b/sources/ewol/widget/WidgetManager.cpp index ea93c091..bd14490c 100644 --- a/sources/ewol/widget/WidgetManager.cpp +++ b/sources/ewol/widget/WidgetManager.cpp @@ -259,30 +259,34 @@ void ewol::WidgetManager::AddWidgetCreator(const etk::UString& _name, ewol::Widg if (NULL==_pointer) { return; } - if (true==m_creatorList.Exist(_name)) { - EWOL_WARNING("Replace Creator of a specify widget : " << _name); - m_creatorList[_name] = _pointer; + //Keep name in lower case : + etk::UString nameLower = _name.ToLower(); + if (true==m_creatorList.Exist(nameLower)) { + EWOL_WARNING("Replace Creator of a specify widget : " << nameLower); + m_creatorList[nameLower] = _pointer; return; } - EWOL_INFO("Add Creator of a specify widget : " << _name); - m_creatorList.Add(_name, _pointer); + EWOL_INFO("Add Creator of a specify widget : " << nameLower); + m_creatorList.Add(nameLower, _pointer); } ewol::Widget* ewol::WidgetManager::Create(const etk::UString& _name) { - if (true==m_creatorList.Exist(_name)) { - ewol::WidgetManager::creator_tf pointerFunction = m_creatorList[_name]; + etk::UString nameLower = _name.ToLower(); + if (true==m_creatorList.Exist(nameLower)) { + ewol::WidgetManager::creator_tf pointerFunction = m_creatorList[nameLower]; if (NULL != pointerFunction) { return pointerFunction(); } } - EWOL_WARNING("try to create an UnExistant widget : " << _name); + EWOL_WARNING("try to create an UnExistant widget : " << nameLower); return NULL; } bool ewol::WidgetManager::Exist(const etk::UString& _name) { - return m_creatorList.Exist(_name); + etk::UString nameLower = _name.ToLower(); + return m_creatorList.Exist(nameLower); } etk::UString ewol::WidgetManager::List(void)