Loading gui/action.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -385,8 +385,9 @@ int GUIAction::doActions() } else { for (it = mActions.begin(); it != mActions.end(); ++it) doAction(*it); const size_t cnt = mActions.size(); for (size_t i = 0; i < cnt; ++i) doAction(mActions[i]); } return 0; Loading Loading @@ -484,7 +485,6 @@ int GUIAction::reload(std::string arg) int check = 0, ret_val = 0; std::string theme_path; operation_start("Reload Theme"); theme_path = DataManager::GetSettingsStoragePath(); if (PartitionManager.Mount_By_Path(theme_path.c_str(), 1) < 0) { LOGERR("Unable to mount %s during reload function startup.\n", theme_path.c_str()); Loading @@ -502,7 +502,6 @@ int GUIAction::reload(std::string arg) ret_val = 1; } } operation_end(ret_val); return 0; } Loading gui/pages.cpp +25 −11 Original line number Diff line number Diff line Loading @@ -557,11 +557,16 @@ PageSet::~PageSet() { for (std::vector<Page*>::iterator itr = mPages.begin(); itr != mPages.end(); ++itr) delete *itr; for (std::vector<xml_node<>*>::iterator itr2 = templates.begin(); itr2 != templates.end(); ++itr2) delete *itr2; delete mResources; free(mXmlFile); mDoc.clear(); for (std::vector<xml_document<>*>::iterator itr = mIncludedDocs.begin(); itr != mIncludedDocs.end(); ++itr) { (*itr)->clear(); delete *itr; } } int PageSet::Load(ZipArchive* package) Loading Loading @@ -620,7 +625,7 @@ int PageSet::CheckInclude(ZipArchive* package, xml_document<> *parentDoc) long len; char* xmlFile = NULL; string filename; xml_document<> doc; xml_document<> *doc = NULL; par = parentDoc->first_node("recovery"); if (!par) { Loading Loading @@ -682,11 +687,14 @@ int PageSet::CheckInclude(ZipArchive* package, xml_document<> *parentDoc) return -1; } } doc.parse<0>(xmlFile); parent = doc.first_node("recovery"); xmlFile[len] = '\0'; doc = new xml_document<>(); doc->parse<0>(xmlFile); parent = doc->first_node("recovery"); if (!parent) parent = doc.first_node("install"); parent = doc->first_node("install"); // Now, let's parse the XML LOGINFO("Loading included resources...\n"); Loading @@ -711,11 +719,17 @@ int PageSet::CheckInclude(ZipArchive* package, xml_document<> *parentDoc) templates.push_back(xmltemplate); child = parent->first_node("pages"); if (child) if (LoadPages(child)) if (child && LoadPages(child)) { templates.pop_back(); doc->clear(); delete doc; return -1; } mIncludedDocs.push_back(doc); if (CheckInclude(package, &doc)) if (CheckInclude(package, doc)) return -1; chld = chld->next_sibling("xmlfile"); Loading gui/pages.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ protected: std::vector<xml_node<>*> templates; Page* mCurrentPage; Page* mOverlayPage; // This is a special case, used for "locking" the screen std::vector<xml_document<>*> mIncludedDocs; }; class PageManager Loading Loading
gui/action.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -385,8 +385,9 @@ int GUIAction::doActions() } else { for (it = mActions.begin(); it != mActions.end(); ++it) doAction(*it); const size_t cnt = mActions.size(); for (size_t i = 0; i < cnt; ++i) doAction(mActions[i]); } return 0; Loading Loading @@ -484,7 +485,6 @@ int GUIAction::reload(std::string arg) int check = 0, ret_val = 0; std::string theme_path; operation_start("Reload Theme"); theme_path = DataManager::GetSettingsStoragePath(); if (PartitionManager.Mount_By_Path(theme_path.c_str(), 1) < 0) { LOGERR("Unable to mount %s during reload function startup.\n", theme_path.c_str()); Loading @@ -502,7 +502,6 @@ int GUIAction::reload(std::string arg) ret_val = 1; } } operation_end(ret_val); return 0; } Loading
gui/pages.cpp +25 −11 Original line number Diff line number Diff line Loading @@ -557,11 +557,16 @@ PageSet::~PageSet() { for (std::vector<Page*>::iterator itr = mPages.begin(); itr != mPages.end(); ++itr) delete *itr; for (std::vector<xml_node<>*>::iterator itr2 = templates.begin(); itr2 != templates.end(); ++itr2) delete *itr2; delete mResources; free(mXmlFile); mDoc.clear(); for (std::vector<xml_document<>*>::iterator itr = mIncludedDocs.begin(); itr != mIncludedDocs.end(); ++itr) { (*itr)->clear(); delete *itr; } } int PageSet::Load(ZipArchive* package) Loading Loading @@ -620,7 +625,7 @@ int PageSet::CheckInclude(ZipArchive* package, xml_document<> *parentDoc) long len; char* xmlFile = NULL; string filename; xml_document<> doc; xml_document<> *doc = NULL; par = parentDoc->first_node("recovery"); if (!par) { Loading Loading @@ -682,11 +687,14 @@ int PageSet::CheckInclude(ZipArchive* package, xml_document<> *parentDoc) return -1; } } doc.parse<0>(xmlFile); parent = doc.first_node("recovery"); xmlFile[len] = '\0'; doc = new xml_document<>(); doc->parse<0>(xmlFile); parent = doc->first_node("recovery"); if (!parent) parent = doc.first_node("install"); parent = doc->first_node("install"); // Now, let's parse the XML LOGINFO("Loading included resources...\n"); Loading @@ -711,11 +719,17 @@ int PageSet::CheckInclude(ZipArchive* package, xml_document<> *parentDoc) templates.push_back(xmltemplate); child = parent->first_node("pages"); if (child) if (LoadPages(child)) if (child && LoadPages(child)) { templates.pop_back(); doc->clear(); delete doc; return -1; } mIncludedDocs.push_back(doc); if (CheckInclude(package, &doc)) if (CheckInclude(package, doc)) return -1; chld = chld->next_sibling("xmlfile"); Loading
gui/pages.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ protected: std::vector<xml_node<>*> templates; Page* mCurrentPage; Page* mOverlayPage; // This is a special case, used for "locking" the screen std::vector<xml_document<>*> mIncludedDocs; }; class PageManager Loading