mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
COPKGManager: optimize handling after installation
Show a success message only if restart/reboot is required and user should decide what to do or not. NOTE: marker file should be generated by opkg package itself (eg. with preinstall scripts), so it's controlled by the package maintainer!
This commit is contained in:
@@ -1869,7 +1869,7 @@ opkg.messagebox.reinstall %s erneut installieren?
|
|||||||
opkg.messagebox.remove %s entfernen?
|
opkg.messagebox.remove %s entfernen?
|
||||||
opkg.messagebox.size.error Nicht genügend freier Speicher für Paketinstallation verfügbar!
|
opkg.messagebox.size.error Nicht genügend freier Speicher für Paketinstallation verfügbar!
|
||||||
opkg.messagebox.updates.available Aktualisierungen verfügbar!
|
opkg.messagebox.updates.available Aktualisierungen verfügbar!
|
||||||
opkg.success.install Installation erfolgreich, Neustart von Neutrino kann erforderlich sein.
|
opkg.success.install Installation erfolgreich!\nNeustart von Neutrino kann erforderlich sein. Jetzt neu starten?
|
||||||
opkg.title Paketverwaltung
|
opkg.title Paketverwaltung
|
||||||
opkg.upgrade Installierte Pakete aktualisieren
|
opkg.upgrade Installierte Pakete aktualisieren
|
||||||
options.default Voreinstellungen benutzen
|
options.default Voreinstellungen benutzen
|
||||||
|
@@ -1869,7 +1869,7 @@ opkg.messagebox.reinstall Re-install %s?
|
|||||||
opkg.messagebox.remove Remove %s?
|
opkg.messagebox.remove Remove %s?
|
||||||
opkg.messagebox.size.error Not enough free memory available for this package!
|
opkg.messagebox.size.error Not enough free memory available for this package!
|
||||||
opkg.messagebox.updates.available Updates available!
|
opkg.messagebox.updates.available Updates available!
|
||||||
opkg.success.install Install successful, restart of Neutrino might be required.
|
opkg.success.install Install successful!\n restart of Neutrino might be required. Restart now?
|
||||||
opkg.title Package Management
|
opkg.title Package Management
|
||||||
opkg.upgrade Upgrade installed packages
|
opkg.upgrade Upgrade installed packages
|
||||||
options.default Reset to defaults
|
options.default Reset to defaults
|
||||||
|
@@ -1760,7 +1760,7 @@ opkg.messagebox.reinstall Herinstalleer %s?
|
|||||||
opkg.messagebox.remove Wissen%s?
|
opkg.messagebox.remove Wissen%s?
|
||||||
opkg.messagebox.size.error Onvoldoende geheugen beschikbaar voor dit pakket!
|
opkg.messagebox.size.error Onvoldoende geheugen beschikbaar voor dit pakket!
|
||||||
opkg.messagebox.updates.available Updates beschikbare!
|
opkg.messagebox.updates.available Updates beschikbare!
|
||||||
opkg.success.install installatie succesvol, herstart van Neutrino mogelijk vereist.
|
opkg.success.install installatie succesvol!\n herstart van Neutrino mogelijk vereist. Nu opnieuw opstarten?
|
||||||
opkg.title Pakket management
|
opkg.title Pakket management
|
||||||
opkg.upgrade Upgrade geïnstalleerd pakketten
|
opkg.upgrade Upgrade geïnstalleerd pakketten
|
||||||
options.default Herstel standaardwaarden
|
options.default Herstel standaardwaarden
|
||||||
|
@@ -1850,7 +1850,7 @@ opkg.messagebox.reinstall Preinštalovať %s?
|
|||||||
opkg.messagebox.remove Odstrániť %s?
|
opkg.messagebox.remove Odstrániť %s?
|
||||||
opkg.messagebox.size.error Nie je dostatok voľnej pamäte pre tento balík!
|
opkg.messagebox.size.error Nie je dostatok voľnej pamäte pre tento balík!
|
||||||
opkg.messagebox.updates.available Aktualizácia k dispozícii!
|
opkg.messagebox.updates.available Aktualizácia k dispozícii!
|
||||||
opkg.success.install Inštalácia v poriadku, reštart Neutrina bude žiadúci.
|
opkg.success.install inštalácia úspešne!\n Môže byť potrebné reštart neutríno. Teraz reštartovať?
|
||||||
opkg.title Správa balíčkov
|
opkg.title Správa balíčkov
|
||||||
opkg.upgrade Aktualizovanie inštalovaných balíčkov
|
opkg.upgrade Aktualizovanie inštalovaných balíčkov
|
||||||
options.default obnov predvolené
|
options.default obnov predvolené
|
||||||
|
@@ -422,9 +422,36 @@ int COPKGManager::showMenu()
|
|||||||
|
|
||||||
menu->hide ();
|
menu->hide ();
|
||||||
|
|
||||||
if (!has_err && installed)
|
//handling after successful installation
|
||||||
DisplayInfoMessage(g_Locale->getText(LOCALE_OPKG_SUCCESS_INSTALL));
|
string exit_action = "";
|
||||||
|
if (!has_err && installed){
|
||||||
|
/*!
|
||||||
|
Show a success message only if restart/reboot is required and user should decide what to do or not.
|
||||||
|
NOTE: marker file should be generated by opkg package itself (eg. with preinstall scripts),
|
||||||
|
so it's controlled by the package maintainer!
|
||||||
|
*/
|
||||||
|
//restart neutrino: user decision
|
||||||
|
if(!access( "/tmp/.restart", F_OK)){
|
||||||
|
int msg = ShowMsg(LOCALE_OPKG_TITLE, g_Locale->getText(LOCALE_OPKG_SUCCESS_INSTALL), CMsgBox::mbrNo,
|
||||||
|
CMsgBox::mbYesNo,
|
||||||
|
NEUTRINO_ICON_QUESTION,
|
||||||
|
width);
|
||||||
|
if (msg == CMsgBox::mbrYes)
|
||||||
|
exit_action = "restart";
|
||||||
|
}
|
||||||
|
//restart neutrino: forced
|
||||||
|
if (!access( "/tmp/.force_restart", F_OK))
|
||||||
|
exit_action = "restart";
|
||||||
|
//reboot stb: forced
|
||||||
|
if (!access( "/tmp/.reboot", F_OK))
|
||||||
|
exit_action = "reboot";
|
||||||
|
}
|
||||||
|
|
||||||
delete menu;
|
delete menu;
|
||||||
|
|
||||||
|
if (!exit_action.empty())
|
||||||
|
CNeutrinoApp::getInstance()->exec(NULL, exit_action);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user