opkg_manager: rename badpackage() > isBadPackage(), more plausible

Origin commit data
------------------
Branch: ni/coolstream
Commit: 96da59a550
Author: Thilo Graf <dbt@novatux.de>
Date: 2021-04-10 (Sat, 10 Apr 2021)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2021-04-10 22:19:43 +02:00
committed by vanhofen
parent 3baff21531
commit cdbcf97d7a
2 changed files with 6 additions and 6 deletions

View File

@@ -393,7 +393,7 @@ vector<string> COPKGManager::getBadPackagePatternList()
return v_ret;
}
bool COPKGManager::badpackage(std::string &s)
bool COPKGManager::isBadPackage(std::string &s)
{
if(v_bad_pattern.empty())
return false;
@@ -439,7 +439,7 @@ void COPKGManager::updateMenu()
getPkgData(CMD_LIST_UPGRADEABLE);
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); ++it) {
/* this should no longer trigger at all */
if (badpackage(it->second.name))
if (isBadPackage(it->second.name))
continue;
it->second.forwarder->iconName_Info_right = "";
it->second.forwarder->setActive(true);
@@ -659,7 +659,7 @@ int COPKGManager::showMenu()
pkg_vec.clear();
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); ++it) {
/* this should no longer trigger at all */
if (badpackage(it->second.name))
if (isBadPackage(it->second.name))
continue;
it->second.forwarder = new CMenuForwarder(it->second.desc, true, NULL , this, it->second.name.c_str());
it->second.forwarder->setHint("", it->second.desc);
@@ -858,7 +858,7 @@ void COPKGManager::getPkgData(const int pkg_content_id)
switch (pkg_content_id) {
case CMD_LIST: {
/* do not even put "bad" packages into the list to save memory */
if (badpackage(name))
if (isBadPackage(name))
continue;
pkg_map[name] = pkg(name, line, line);
map<string, struct pkg>::iterator it = pkg_map.find(name);

View File

@@ -157,10 +157,10 @@ class COPKGManager : public CMenuTarget
* howto: a simple way to filter a package is to add the pure name, if you want
* to hide a package (even which name) then add this name to a line. Eg. if you want to hide
* package wget then add this and this package is not displayed at the gui.
* Also a few place holders should work, see the badpackage() function, but this
* Also a few place holders should work, see the isBadPackage() function, but this
* can be inaccurately because it could filter innocent packages.
*/
bool badpackage(std::string &s);
bool isBadPackage(std::string &s);
void showError(const char* local_msg, char* err_msg = NULL, const std::string& additional_text = std::string());
int doUpdate();