mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
COPKGManager: use parameters for errror message and additional text as option
This commit is contained in:
@@ -797,12 +797,13 @@ void COPKGManager::showErr(int* res)
|
|||||||
DisplayErrorMessage(errtest.c_str());
|
DisplayErrorMessage(errtest.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void COPKGManager::showError(const char* local_msg, char* err_message, const string& command)
|
void COPKGManager::showError(const char* local_msg, char* err_message, const string& additional_text)
|
||||||
{
|
{
|
||||||
string msg = local_msg ? string(local_msg) + "\n" : "";
|
string msg = local_msg ? string(local_msg) + "\n" : "";
|
||||||
msg += err_msg + "\n";
|
if (err_message)
|
||||||
msg += string(err_message) + ":\n";
|
msg += string(err_message) + ":\n";
|
||||||
msg += command;
|
if (!additional_text.empty())
|
||||||
|
msg += additional_text;
|
||||||
DisplayErrorMessage(msg.c_str());
|
DisplayErrorMessage(msg.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -126,7 +126,7 @@ class COPKGManager : public CMenuTarget
|
|||||||
void updateMenu();
|
void updateMenu();
|
||||||
void refreshMenu();
|
void refreshMenu();
|
||||||
bool badpackage(std::string &s);
|
bool badpackage(std::string &s);
|
||||||
void showError(const char* local_msg, char* err_msg, const std::string& command);
|
void showError(const char* local_msg, char* err_msg = NULL, const std::string& additional_text = std::string());
|
||||||
int doUpdate();
|
int doUpdate();
|
||||||
void handleShellOutput(std::string* cur_line, int* res, bool* ok);
|
void handleShellOutput(std::string* cur_line, int* res, bool* ok);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user