COPKGManager: simplify hintbox calls

Origin commit data
------------------
Commit: 318c64708d
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-20 (Sun, 20 Nov 2016)
This commit is contained in:
2016-11-20 22:53:21 +01:00
parent ac29accd85
commit 8bbe88693f

View File

@@ -491,10 +491,10 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog
int COPKGManager::doUpdate() int COPKGManager::doUpdate()
{ {
CHintBox *hb = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_UPDATE_CHECK); CHintBox hintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_UPDATE_CHECK);
hb->paint(); hintBox.paint();
int r = execCmd(pkg_types[OM_UPDATE], CShellWindow::QUIET); int r = execCmd(pkg_types[OM_UPDATE], CShellWindow::QUIET);
delete hb; hintBox.hide();
if (r) { if (r) {
string msg = string(g_Locale->getText(LOCALE_OPKG_FAILURE_UPDATE)); string msg = string(g_Locale->getText(LOCALE_OPKG_FAILURE_UPDATE));
msg += '\n' + tmp_str; msg += '\n' + tmp_str;