diff --git a/data/locale/deutsch.locale b/data/locale/deutsch.locale index 6d422991a..afd0f3e32 100644 --- a/data/locale/deutsch.locale +++ b/data/locale/deutsch.locale @@ -1878,6 +1878,8 @@ opkg.messagebox.size.error Nicht genügend freier Speicher für Paketinstallatio opkg.messagebox.updates.available Aktualisierungen verfügbar! opkg.success.install Installation erfolgreich!\nNeustart von Neutrino kann erforderlich sein. Jetzt neu starten? opkg.title Paketverwaltung +opkg.update.check Prüfe auf Updates... +opkg.update.reading_lists Paketlisten werden eingelesen... opkg.upgrade Installierte Pakete aktualisieren opkg.warning_3rdparty_packages Drittanbieter-Pakete könnten Ihr System beschädigen! Sind Sie sicher, dieses Paket zu installieren? options.default Voreinstellungen benutzen diff --git a/data/locale/english.locale b/data/locale/english.locale index 388be48ad..385f8ed3a 100644 --- a/data/locale/english.locale +++ b/data/locale/english.locale @@ -1878,6 +1878,8 @@ opkg.messagebox.size.error Not enough free memory available for this package! opkg.messagebox.updates.available Updates available! opkg.success.install Install successful!\n restart of Neutrino might be required. Restart now? opkg.title Package Management +opkg.update.check Checking for updates... +opkg.update.reading_lists Reading package lists... opkg.upgrade Upgrade installed packages opkg.warning_3rdparty_packages 3rd party packages could damage your system! Are you sure install this package? options.default Reset to defaults diff --git a/src/gui/opkg_manager.cpp b/src/gui/opkg_manager.cpp index 1fa1e94ad..b17483f5e 100644 --- a/src/gui/opkg_manager.cpp +++ b/src/gui/opkg_manager.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include #include @@ -432,23 +433,30 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog bool ret = false; - getPkgData(OM_LIST); - getPkgData(OM_LIST_UPGRADEABLE); - size_t i = 0; CProgressWindow status; status.showHeader(false); if (show_progress){ status.paint(); - status.showStatus(i); + status.showStatusMessageUTF(g_Locale->getText(LOCALE_OPKG_UPDATE_READING_LISTS)); + status.showStatus(25); /* after do_update, we have actually done the hardest work already */ } + getPkgData(OM_LIST); + if (show_progress) + status.showStatus(50); + getPkgData(OM_LIST_UPGRADEABLE); + if (show_progress) + status.showStatus(75); + for (map::iterator it = pkg_map.begin(); it != pkg_map.end(); it++){ dprintf(DEBUG_INFO, "[COPKGManager] [%s - %d] Update check for...%s\n", __func__, __LINE__, it->second.name.c_str()); if (show_progress){ + /* showing the names only makes things *much* slower... status.showStatusMessageUTF(it->second.name); - status.showStatus(100*i / pkg_map.size()); + */ + status.showStatus(75 + 25*i / pkg_map.size()); } if (it->second.upgradable){ @@ -477,7 +485,10 @@ bool COPKGManager::checkUpdates(const std::string & package_name, bool show_prog int COPKGManager::doUpdate() { + CHintBox *hb = new CHintBox(LOCALE_MESSAGEBOX_INFO, LOCALE_OPKG_UPDATE_CHECK); + hb->paint(); int r = execCmd(pkg_types[OM_UPDATE], CShellWindow::QUIET); + delete hb; if (r) { string msg = string(g_Locale->getText(LOCALE_OPKG_FAILURE_UPDATE)); msg += '\n' + tmp_str; diff --git a/src/system/locals.h b/src/system/locals.h index 1323053fa..573931828 100644 --- a/src/system/locals.h +++ b/src/system/locals.h @@ -1905,6 +1905,8 @@ typedef enum LOCALE_OPKG_MESSAGEBOX_UPDATES_AVAILABLE, LOCALE_OPKG_SUCCESS_INSTALL, LOCALE_OPKG_TITLE, + LOCALE_OPKG_UPDATE_CHECK, + LOCALE_OPKG_UPDATE_READING_LISTS, LOCALE_OPKG_UPGRADE, LOCALE_OPKG_WARNING_3RDPARTY_PACKAGES, LOCALE_OPTIONS_DEFAULT, diff --git a/src/system/locals_intern.h b/src/system/locals_intern.h index 4a7a86c5b..57ab07fd5 100644 --- a/src/system/locals_intern.h +++ b/src/system/locals_intern.h @@ -1905,6 +1905,8 @@ const char * locale_real_names[] = "opkg.messagebox.updates.available", "opkg.success.install", "opkg.title", + "opkg.update.check", + "opkg.update.reading_lists", "opkg.upgrade", "opkg.warning_3rdparty_packages", "options.default",