mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
opkg_manager: rename badpackage() > isBadPackage(), more plausible
This commit is contained in:
@@ -393,7 +393,7 @@ vector<string> COPKGManager::getBadPackagePatternList()
|
|||||||
return v_ret;
|
return v_ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool COPKGManager::badpackage(std::string &s)
|
bool COPKGManager::isBadPackage(std::string &s)
|
||||||
{
|
{
|
||||||
if(v_bad_pattern.empty())
|
if(v_bad_pattern.empty())
|
||||||
return false;
|
return false;
|
||||||
@@ -439,7 +439,7 @@ void COPKGManager::updateMenu()
|
|||||||
getPkgData(CMD_LIST_UPGRADEABLE);
|
getPkgData(CMD_LIST_UPGRADEABLE);
|
||||||
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); ++it) {
|
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); ++it) {
|
||||||
/* this should no longer trigger at all */
|
/* this should no longer trigger at all */
|
||||||
if (badpackage(it->second.name))
|
if (isBadPackage(it->second.name))
|
||||||
continue;
|
continue;
|
||||||
it->second.forwarder->iconName_Info_right = "";
|
it->second.forwarder->iconName_Info_right = "";
|
||||||
it->second.forwarder->setActive(true);
|
it->second.forwarder->setActive(true);
|
||||||
@@ -659,7 +659,7 @@ int COPKGManager::showMenu()
|
|||||||
pkg_vec.clear();
|
pkg_vec.clear();
|
||||||
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); ++it) {
|
for (map<string, struct pkg>::iterator it = pkg_map.begin(); it != pkg_map.end(); ++it) {
|
||||||
/* this should no longer trigger at all */
|
/* this should no longer trigger at all */
|
||||||
if (badpackage(it->second.name))
|
if (isBadPackage(it->second.name))
|
||||||
continue;
|
continue;
|
||||||
it->second.forwarder = new CMenuForwarder(it->second.desc, true, NULL , this, it->second.name.c_str());
|
it->second.forwarder = new CMenuForwarder(it->second.desc, true, NULL , this, it->second.name.c_str());
|
||||||
it->second.forwarder->setHint("", it->second.desc);
|
it->second.forwarder->setHint("", it->second.desc);
|
||||||
@@ -858,7 +858,7 @@ void COPKGManager::getPkgData(const int pkg_content_id)
|
|||||||
switch (pkg_content_id) {
|
switch (pkg_content_id) {
|
||||||
case CMD_LIST: {
|
case CMD_LIST: {
|
||||||
/* do not even put "bad" packages into the list to save memory */
|
/* do not even put "bad" packages into the list to save memory */
|
||||||
if (badpackage(name))
|
if (isBadPackage(name))
|
||||||
continue;
|
continue;
|
||||||
pkg_map[name] = pkg(name, line, line);
|
pkg_map[name] = pkg(name, line, line);
|
||||||
map<string, struct pkg>::iterator it = pkg_map.find(name);
|
map<string, struct pkg>::iterator it = pkg_map.find(name);
|
||||||
|
@@ -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
|
* 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
|
* 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.
|
* 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.
|
* 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());
|
void showError(const char* local_msg, char* err_msg = NULL, const std::string& additional_text = std::string());
|
||||||
int doUpdate();
|
int doUpdate();
|
||||||
|
Reference in New Issue
Block a user