diff --git a/CHANGELOG.md b/CHANGELOG.md index e16043a4..a41513aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - new **type** field on settings to specify the Timeshift backup mode: **RSYNC** or **BTRFS** - Trim - the dialog is now displayed before the upgrading process (but the operation is only executed after a successful upgrade) +- Settings + - new option to disable the reboot dialog after a successful upgrade (`updates.ask_for_reboot`) ### UI - icons, buttons and colors changes diff --git a/README.md b/README.md index 17b1a853..027b1e08 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,7 @@ ui: auto_scale: false # activates Qt auto screen scale factor (QT_AUTO_SCREEN_SCALE_FACTOR). It fixes scaling issues for some desktop environments ( like Gnome ) updates: check_interval: 30 # the updates checking interval in SECONDS + ask_for_reboot: true # if a dialog asking for a system reboot should be displayed after a successful upgrade disk: trim: after_upgrade: false # it trims the hard disk after a successfull packages upgrade ( `fstrim -a -v` ). 'true' will automatically perform the trim and 'null' will display a confirmation dialog diff --git a/bauh/view/core/config.py b/bauh/view/core/config.py index f6695624..938a5d81 100644 --- a/bauh/view/core/config.py +++ b/bauh/view/core/config.py @@ -18,7 +18,8 @@ def read_config(update_file: bool = False) -> dict: }, 'locale': None, 'updates': { - 'check_interval': 30 + 'check_interval': 30, + 'ask_for_reboot': True }, 'system': { 'notifications': True, diff --git a/bauh/view/core/settings.py b/bauh/view/core/settings.py index 7d34c5a8..66096dc8 100644 --- a/bauh/view/core/settings.py +++ b/bauh/view/core/settings.py @@ -240,7 +240,14 @@ class GenericSettingsManager: max_width=default_width, id_="sugs_by_type") - sub_comps = [FormComponent([select_locale, select_store_pwd, select_sysnotify, select_sugs, inp_sugs], spaces=False)] + inp_reboot = self._gen_select(label=self.i18n['core.config.updates.reboot'], + tip=self.i18n['core.config.updates.reboot.tip'], + id_='ask_for_reboot', + max_width=default_width, + value=bool(core_config['updates']['ask_for_reboot']), + opts=[(self.i18n['ask'].capitalize(), True, None), (self.i18n['no'].capitalize(), False, None)]) + + sub_comps = [FormComponent([select_locale, select_store_pwd, select_sysnotify, select_sugs, inp_sugs, inp_reboot], spaces=False)] return TabComponent(self.i18n['core.config.tab.general'].capitalize(), PanelComponent(sub_comps), None, 'core.gen') def _gen_bool_component(self, label: str, tooltip: str, value: bool, id_: str, max_width: int = 200) -> SingleSelectComponent: @@ -279,6 +286,8 @@ class GenericSettingsManager: sugs_by_type = general_form.get_component('sugs_by_type').get_int_value() core_config['suggestions']['by_type'] = sugs_by_type + core_config['updates']['ask_for_reboot'] = general_form.get_component('ask_for_reboot').get_selected() + # advanced adv_form = advanced.components[0] diff --git a/bauh/view/qt/thread.py b/bauh/view/qt/thread.py index b9029afb..14b021cc 100644 --- a/bauh/view/qt/thread.py +++ b/bauh/view/qt/thread.py @@ -458,10 +458,11 @@ class UpgradeSelected(AsyncAction): if should_trim: self._trim_disk(root_password) - msg = '

{}

{}


{}

'.format(self.i18n['action.update.success.reboot.line1'], - self.i18n['action.update.success.reboot.line2'], - self.i18n['action.update.success.reboot.line3']) - self.request_reboot(msg) + if bool(app_config['updates']['ask_for_reboot']): + msg = '

{}

{}


{}

'.format(self.i18n['action.update.success.reboot.line1'], + self.i18n['action.update.success.reboot.line2'], + self.i18n['action.update.success.reboot.line3']) + self.request_reboot(msg) self.notify_finished({'success': success, 'updated': updated, 'types': updated_types, 'id': upgrade_id}) self.pkgs = None diff --git a/bauh/view/resources/locale/ca b/bauh/view/resources/locale/ca index 03a1758a..ec9edcd9 100644 --- a/bauh/view/resources/locale/ca +++ b/bauh/view/resources/locale/ca @@ -222,6 +222,8 @@ core.config.ui.tray.updates_icon=Update icon core.config.ui.tray.updates_icon.tip=The displayed icon when there are updates available core.config.updates.interval=Updates interval core.config.updates.interval.tip=Defines the time interval in which the update-checking for the installed applications will happen ( in SECONDS ) +core.config.updates.reboot=Reboot after upgrading +core.config.updates.reboot.tip=A message asking for a system reboot will be displayed after a successful upgrade custom_action.proceed_with=Proceed with {} ? description=descripció details=detalls diff --git a/bauh/view/resources/locale/de b/bauh/view/resources/locale/de index b95c1078..0a2306ff 100644 --- a/bauh/view/resources/locale/de +++ b/bauh/view/resources/locale/de @@ -221,6 +221,8 @@ core.config.ui.tray.updates_icon=Icon bei Updates core.config.ui.tray.updates_icon.tip=The displayed icon when there are updates available core.config.updates.interval=Update-Intervall core.config.updates.interval.tip=Das Intervall (in Sekunden), in dem nach Updates für die installierten Anwendungen gesucht wird. +core.config.updates.reboot=Reboot after upgrading +core.config.updates.reboot.tip=A message asking for a system reboot will be displayed after a successful upgrade custom_action.proceed_with=Proceed with {} ? description=Beschreibung details=Details diff --git a/bauh/view/resources/locale/en b/bauh/view/resources/locale/en index b594ccf3..404372f1 100644 --- a/bauh/view/resources/locale/en +++ b/bauh/view/resources/locale/en @@ -221,6 +221,8 @@ core.config.ui.tray.updates_icon.tip=The displayed icon when there are updates a core.config.ui.tray.updates_icon=Update icon core.config.updates.interval.tip=Defines the time interval in which the update-checking for the installed applications will happen ( in SECONDS ) core.config.updates.interval=Updates interval +core.config.updates.reboot=Reboot after upgrading +core.config.updates.reboot.tip=A message asking for a system reboot will be displayed after a successful upgrade custom_action.proceed_with=Proceed with {} ? description=description details=details diff --git a/bauh/view/resources/locale/es b/bauh/view/resources/locale/es index 0fa23bd8..76fb99b0 100644 --- a/bauh/view/resources/locale/es +++ b/bauh/view/resources/locale/es @@ -222,6 +222,8 @@ core.config.ui.tray.updates_icon=Icono de actualización core.config.ui.tray.updates_icon.tip=El icono que se muestra cuando hay actualizaciones disponibles core.config.updates.interval=Intervalo de actualizaciones core.config.updates.interval.tip=Define el intervalo de tiempo en el que se realizará la verificación de actualizaciones para las aplicaciones instaladas ( en SEGUNDOS ) +core.config.updates.reboot=Reiniciar después de actualizar +core.config.updates.reboot.tip=Se mostrará un mensaje solicitando el reinicio del sistema después de una actualización exitosa custom_action.proceed_with=¿Continuar con {}? description=descripción details=detalles diff --git a/bauh/view/resources/locale/it b/bauh/view/resources/locale/it index 169854d7..def0b8db 100644 --- a/bauh/view/resources/locale/it +++ b/bauh/view/resources/locale/it @@ -222,6 +222,8 @@ core.config.ui.tray.updates_icon=Update icon core.config.ui.tray.updates_icon.tip=The displayed icon when there are updates available core.config.updates.interval=Updates interval core.config.updates.interval.tip=Defines the time interval in which the update-checking for the installed applications will happen ( in SECONDS ) +core.config.updates.reboot=Reboot after upgrading +core.config.updates.reboot.tip=A message asking for a system reboot will be displayed after a successful upgrade custom_action.proceed_with=Proceed with {} ? description=descrizione details=dettagli diff --git a/bauh/view/resources/locale/pt b/bauh/view/resources/locale/pt index a1e763b0..0ecf7902 100644 --- a/bauh/view/resources/locale/pt +++ b/bauh/view/resources/locale/pt @@ -221,6 +221,8 @@ core.config.ui.tray.updates_icon.tip=O ícone exibido quando há atualizações core.config.ui.tray.updates_icon=Ícone de atualização core.config.updates.interval.tip=Define o intervalo de tempo em que ocorrerá a verificação de atualizações para os aplicativos instalados ( em SEGUNDOS ) core.config.updates.interval=Intervalo de atualizações +core.config.updates.reboot=Reinicializar após atualizar +core.config.updates.reboot.tip=Uma mensagem perguntando se o sistema deve ser reinicializado será exibida após uma atualização bem sucedida custom_action.proceed_with=Continuar com {} ? description=descrição details=detalhes diff --git a/bauh/view/resources/locale/ru b/bauh/view/resources/locale/ru index bbc5bc8e..311da13c 100644 --- a/bauh/view/resources/locale/ru +++ b/bauh/view/resources/locale/ru @@ -221,6 +221,8 @@ core.config.ui.tray.updates_icon=Значок обновления core.config.ui.tray.updates_icon.tip=Значок, отображаемый при наличии доступных обновлений core.config.updates.interval=Интервал обновления core.config.updates.interval.tip=Определяет интервал времени, в течение которого будет происходить проверка обновлений для установленных приложений ( в секундах ) +core.config.updates.reboot=Reboot after upgrading +core.config.updates.reboot.tip=A message asking for a system reboot will be displayed after a successful upgrade custom_action.proceed_with=Proceed with {} ? description=Описание details=Детали diff --git a/bauh/view/resources/locale/tr b/bauh/view/resources/locale/tr index 5a0d7d98..a3178561 100644 --- a/bauh/view/resources/locale/tr +++ b/bauh/view/resources/locale/tr @@ -221,6 +221,8 @@ core.config.ui.tray.updates_icon.tip=Güncelleme mevcut olduğunda görüntülen core.config.ui.tray.updates_icon=Simge değiştir core.config.updates.interval.tip=Yüklü uygulamalar için güncelleme denetiminin gerçekleşeceği zaman aralığını tanımlar (SANİYE) core.config.updates.interval=Güncelleme aralığı +core.config.updates.reboot=Reboot after upgrading +core.config.updates.reboot.tip=A message asking for a system reboot will be displayed after a successful upgrade custom_action.proceed_with={} ile devam et ? description=açıklama details=detaylar