diff --git a/bauh/view/core/config.py b/bauh/view/core/config.py index 7bfe8471..4fe56fb5 100644 --- a/bauh/view/core/config.py +++ b/bauh/view/core/config.py @@ -2,7 +2,6 @@ import logging import os import traceback from pathlib import Path -from typing import List import yaml @@ -23,7 +22,8 @@ def read_config(update_file: bool = False) -> dict: 'locale': None, 'updates': { 'check_interval': 30, - 'sort_packages': True + 'sort_packages': True, + "pre_dependency_checking": True }, 'system': { 'notifications': True, diff --git a/bauh/view/core/settings.py b/bauh/view/core/settings.py index 42f924df..88af0cf0 100644 --- a/bauh/view/core/settings.py +++ b/bauh/view/core/settings.py @@ -80,6 +80,7 @@ class GenericSettingsManager: select_dcache = self._gen_bool_component(label=self.i18n['core.config.disk_cache'], tooltip=self.i18n['core.config.disk_cache.tip'], value=core_config['disk_cache']['enabled'], + max_width=default_width, id_='dcache') input_data_exp = TextInputComponent(label=self.i18n['core.config.mem_cache.data_exp'], @@ -98,10 +99,16 @@ class GenericSettingsManager: select_update_sort = self._gen_bool_component(label=self.i18n['core.config.updates.sort_pkgs'], tooltip=self.i18n['core.config.updates.sort_pkgs.tip'], - value=core_config['updates']['sort_packages'], + value=bool(core_config['updates']['sort_packages']), max_width=default_width, id_="up_sort") + select_update_check = self._gen_bool_component(label=self.i18n['core.config.updates.dep_check'], + tooltip=self.i18n['core.config.updates.dep_check.tip'], + value=bool(core_config['updates']['pre_dependency_checking']), + max_width=default_width, + id_="up_dep_check") + select_dep_check = self._gen_bool_component(label=self.i18n['core.config.system.dep_checking'], tooltip=self.i18n['core.config.system.dep_checking.tip'], value=core_config['system']['single_dependency_checking'], @@ -114,7 +121,7 @@ class GenericSettingsManager: max_width=default_width, value=core_config['download']['multithreaded']) - sub_comps = [FormComponent([select_dcache, select_dmthread, select_update_sort, select_dep_check, input_data_exp, input_icon_exp], spaces=False)] + sub_comps = [FormComponent([select_dcache, select_dmthread, select_update_check, select_update_sort, select_dep_check, input_data_exp, input_icon_exp], spaces=False)] return TabComponent(self.i18n['core.config.tab.advanced'].capitalize(), PanelComponent(sub_comps), None, 'core.adv') def _gen_tray_settings(self, core_config: dict, screen_width: int, screen_height: int) -> TabComponent: @@ -270,6 +277,7 @@ class GenericSettingsManager: download_mthreaded = adv_form.get_component('down_mthread').get_selected() core_config['download']['multithreaded'] = download_mthreaded + core_config['updates']['pre_dependency_checking'] = adv_form.get_component('up_dep_check').get_selected() core_config['updates']['sort_packages'] = adv_form.get_component('up_sort').get_selected() single_dep_check = adv_form.get_component('dep_check').get_selected() diff --git a/bauh/view/qt/thread.py b/bauh/view/qt/thread.py index c35d4273..c4df112d 100644 --- a/bauh/view/qt/thread.py +++ b/bauh/view/qt/thread.py @@ -173,7 +173,7 @@ class UpdateSelectedApps(AsyncAction): models = [view.model for view in self.pkgs] - if not self._handle_update_requirements(models): + if bool(app_config['updates']['pre_dependency_checking']) and not self._handle_update_requirements(models): return proceed, sorted_pkgs = self._sort_packages(models, app_config) diff --git a/bauh/view/resources/locale/ca b/bauh/view/resources/locale/ca index dec9990f..ba5650fa 100644 --- a/bauh/view/resources/locale/ca +++ b/bauh/view/resources/locale/ca @@ -255,6 +255,8 @@ core.config.ui.auto_scale=Auto scale core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments. core.config.updates.sort_pkgs=Sort updates core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues +core.config.updates.dep_check=Mostra els requisits d’actualització +core.config.updates.dep_check.tip=Mostra tots els paquets / aplicacions addicionals que cal instal·lar abans de començar a actualitzar els seleccionats settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart. settings.changed.success.reboot=Restart now ? settings.error=It was not possible to properly change all the settings diff --git a/bauh/view/resources/locale/de b/bauh/view/resources/locale/de index 566a1d38..6cc47d7f 100644 --- a/bauh/view/resources/locale/de +++ b/bauh/view/resources/locale/de @@ -210,6 +210,8 @@ core.config.ui.auto_scale=Auto scale core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments. core.config.updates.sort_pkgs=Sort updates core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues +core.config.updates.dep_check=Show update requirements +core.config.updates.dep_check.tip=Displays all additional packages / applications that need to be installed before starting to update selected ones settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart. settings.changed.success.reboot=Restart now ? settings.error=It was not possible to properly change all the settings diff --git a/bauh/view/resources/locale/en b/bauh/view/resources/locale/en index cf831bbe..04dec77a 100644 --- a/bauh/view/resources/locale/en +++ b/bauh/view/resources/locale/en @@ -217,6 +217,8 @@ core.config.ui.auto_scale=Auto scale core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments. core.config.updates.sort_pkgs=Sort updates core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues +core.config.updates.dep_check=Show update requirements +core.config.updates.dep_check.tip=Displays all additional packages / applications that need to be installed before starting to update selected ones settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart. settings.changed.success.reboot=Restart now ? settings.error=It was not possible to properly change all the settings @@ -232,7 +234,7 @@ download=download clean=clean action.update.status.sorting=Determining the best update order action.update.requirements.title=Upgrade requirements -action.update.requirements.body=The following applications / packages must be installed before upgrading +action.update.requirements.body=The following {} applications / packages must be installed before upgrading action.update.install_req.fail.title=Installation failed action.update.install_req.fail.body=It was not possible to install {} action.update.requirements.status=Checking requirements diff --git a/bauh/view/resources/locale/es b/bauh/view/resources/locale/es index 374dd3e9..fafa7ea1 100644 --- a/bauh/view/resources/locale/es +++ b/bauh/view/resources/locale/es @@ -258,6 +258,8 @@ core.config.ui.auto_scale=Escala automática core.config.ui.auto_scale.tip=Activa el factor de escala de pantalla automática ( {} ). Soluciona problemas de escala para algunos ambientes desktop. core.config.updates.sort_pkgs=Ordenar actualizaciones core.config.updates.sort_pkgs.tip=Define el mejor orden de actualización para las aplicaciones / paquetes seleccionados para evitar problemas +core.config.updates.dep_check=Mostrar requisitos de actualización +core.config.updates.dep_check.tip=Muestra todos los paquetes / aplicaciones adicionales que deben instalarse antes de comenzar a actualizar los seleccionados settings.changed.success.warning=Las configuraciones se cambiaron con éxito. Algunas solo tendrán efecto después del reinicio. settings.changed.success.reboot=¿Reiniciar ahora? settings.error=No fue posible cambiar correctamente todas las configuraciones diff --git a/bauh/view/resources/locale/it b/bauh/view/resources/locale/it index 775d2163..f0f24f01 100644 --- a/bauh/view/resources/locale/it +++ b/bauh/view/resources/locale/it @@ -210,6 +210,8 @@ core.config.ui.auto_scale=Auto scale core.config.ui.auto_scale.tip=It activates the auto screen scale factor ( {} ). It fixes scaling issues for some desktop environments. core.config.updates.sort_pkgs=Sort updates core.config.updates.sort_pkgs.tip=Defines the best update order for the selected applications / packages to avoid issues +core.config.updates.dep_check=Mostra i requisiti di aggiornamento +core.config.updates.dep_check.tip=Visualizza tutti i pacchetti / applicazioni aggiuntivi che devono essere installati prima di iniziare ad aggiornare quelli selezionati settings.changed.success.warning=Settings successfully changed. Some of them will only take effect after a restart. settings.changed.success.reboot=Restart now ? settings.error=It was not possible to properly change all the settings diff --git a/bauh/view/resources/locale/pt b/bauh/view/resources/locale/pt index afd3ae7f..5e9aa3e9 100644 --- a/bauh/view/resources/locale/pt +++ b/bauh/view/resources/locale/pt @@ -261,6 +261,8 @@ core.config.ui.auto_scale=Escala automática core.config.ui.auto_scale.tip=Ativa o fator de escala automático ( {} ). Corrige problemas de escala para alguns ambientes desktop. core.config.updates.sort_pkgs=Organizar atualizações core.config.updates.sort_pkgs.tip=Define a melhor ordem de atualização para os aplicativos / pacotes selecionados para evitar problemas +core.config.updates.dep_check=Mostrar requisitos de atualização +core.config.updates.dep_check.tip=Exibe todos os pacotes / aplicativos adicionais que precisam ser instalados antes de iniciar a atualização dos selecionados settings.changed.success.warning=Configurações alteradas com sucesso ! Algumas delas só surtirão após a reinicialização. settings.changed.success.reboot=Reiniciar agora ? settings.error=Não foi possível alterar todas as configurações adequadamente