diff --git a/bauh/gems/arch/controller.py b/bauh/gems/arch/controller.py index c3309f43..93f7876b 100644 --- a/bauh/gems/arch/controller.py +++ b/bauh/gems/arch/controller.py @@ -1142,17 +1142,15 @@ class ArchManager(SoftwareManager): def _request_unncessary_uninstall_confirmation(self, uninstalled: Iterable[str], unnecessary: Iterable[str], watcher: ProcessWatcher) -> Optional[List[str]]: reqs = [InputOption(label=p, value=p, icon_path=get_icon_path(), read_only=False) for p in unnecessary] - reqs_select = MultipleSelectComponent(options=reqs, default_options=set(reqs), label="", max_per_line=3) + reqs_select = MultipleSelectComponent(options=reqs, default_options=set(reqs), label="", max_per_line=3 if len(reqs) > 9 else 1) if not watcher.request_confirmation(title=self.i18n['arch.uninstall.unnecessary.l1'].capitalize(), - body='
{}
'.format(self.i18n['arch.uninstall.unnecessary.l2']), + body='{}
'.format(self.i18n['arch.uninstall.unnecessary.l2'] + ':'), components=[reqs_select], - confirmation_label=self.i18n['arch.uninstall.unnecessary.proceed'].capitalize(), - deny_label=self.i18n['arch.uninstall.unnecessary.cancel'].capitalize(), + deny_label=self.i18n['arch.uninstall.unnecessary.proceed'].capitalize(), + confirmation_label=self.i18n['arch.uninstall.unnecessary.cancel'].capitalize(), window_cancel=False): - return - - return reqs_select.get_selected_values() + return reqs_select.get_selected_values() def _request_all_unncessary_uninstall_confirmation(self, pkgs: Iterable[str], context: TransactionContext): reqs = [InputOption(label=p, value=p, icon_path=get_icon_path(), read_only=True) for p in pkgs] diff --git a/bauh/gems/arch/resources/locale/ca b/bauh/gems/arch/resources/locale/ca index 811413e5..042f40cf 100644 --- a/bauh/gems/arch/resources/locale/ca +++ b/bauh/gems/arch/resources/locale/ca @@ -218,7 +218,7 @@ arch.uninstall.required_by.advice=It is necessary to uninstall them as well to p arch.uninstall.unnecessary.all=The following {} packages will be uninstalled arch.uninstall.unnecessary.cancel=Keep arch.uninstall.unnecessary.l1=Packages successfully uninstalled! -arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary. Select those you want to uninstall +arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary arch.uninstall.unnecessary.proceed=Uninstall arch.uninstalling.conflict=Uninstalling conflicting packages arch.uninstalling.conflict.fail=It was not possible to uninstall the conflicting packages: {} diff --git a/bauh/gems/arch/resources/locale/de b/bauh/gems/arch/resources/locale/de index 76d49c5f..5a05b4c7 100644 --- a/bauh/gems/arch/resources/locale/de +++ b/bauh/gems/arch/resources/locale/de @@ -218,7 +218,7 @@ arch.uninstall.required_by.advice=It is necessary to uninstall them as well to p arch.uninstall.unnecessary.all=The following {} packages will be uninstalled arch.uninstall.unnecessary.cancel=Keep arch.uninstall.unnecessary.l1=Packages successfully uninstalled! -arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary. Select those you want to uninstall +arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary arch.uninstall.unnecessary.proceed=Uninstall arch.uninstalling.conflict=Uninstalling conflicting packages arch.uninstalling.conflict.fail=It was not possible to uninstall the conflicting packages: {} diff --git a/bauh/gems/arch/resources/locale/en b/bauh/gems/arch/resources/locale/en index c31b46d5..9855d84b 100644 --- a/bauh/gems/arch/resources/locale/en +++ b/bauh/gems/arch/resources/locale/en @@ -219,7 +219,7 @@ arch.uninstall.required_by.advice=It is necessary to uninstall them as well to p arch.uninstall.unnecessary.all=The following {} packages will be uninstalled arch.uninstall.unnecessary.cancel=Keep arch.uninstall.unnecessary.l1=Packages successfully uninstalled! -arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary. Select those you want to uninstall +arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary arch.uninstall.unnecessary.proceed=Uninstall arch.uninstalling.conflict=Uninstalling conflicting packages arch.uninstalling.conflict.fail=It was not possible to uninstall the conflicting packages: {} diff --git a/bauh/gems/arch/resources/locale/es b/bauh/gems/arch/resources/locale/es index 64f5865e..4a16fafa 100644 --- a/bauh/gems/arch/resources/locale/es +++ b/bauh/gems/arch/resources/locale/es @@ -218,7 +218,7 @@ arch.uninstall.required_by.advice=Es necesario desinstalarlos también para cont arch.uninstall.unnecessary.all=Los {} seguintes paquetes serán desinstalados arch.uninstall.unnecessary.cancel=Mantener arch.uninstall.unnecessary.l1=¡Paquetes desinstalados con éxito! -arch.uninstall.unnecessary.l2=Parece que los paquetes abajo ya no son necesarios. Seleccione los que desea desinstalar +arch.uninstall.unnecessary.l2=Parece que los paquetes abajo ya no son necesarios arch.uninstall.unnecessary.proceed=Desinstalar arch.uninstalling.conflict=Eliminando paquetes conflictivos arch.uninstalling.conflict.fail=No fue posible desinstalar los paquetes conflictivos: {} diff --git a/bauh/gems/arch/resources/locale/it b/bauh/gems/arch/resources/locale/it index 3011a2a1..09477ed5 100644 --- a/bauh/gems/arch/resources/locale/it +++ b/bauh/gems/arch/resources/locale/it @@ -218,7 +218,7 @@ arch.uninstall.required_by.advice=It is necessary to uninstall them as well to p arch.uninstall.unnecessary.all=The following {} packages will be uninstalled arch.uninstall.unnecessary.cancel=Keep arch.uninstall.unnecessary.l1=Packages successfully uninstalled! -arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary. Select those you want to uninstall +arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary arch.uninstall.unnecessary.proceed=Uninstall arch.uninstalling.conflict=Uninstalling conflicting packages arch.uninstalling.conflict.fail=It was not possible to uninstall the conflicting packages: {} diff --git a/bauh/gems/arch/resources/locale/pt b/bauh/gems/arch/resources/locale/pt index 77706226..5396b5a3 100644 --- a/bauh/gems/arch/resources/locale/pt +++ b/bauh/gems/arch/resources/locale/pt @@ -218,7 +218,7 @@ arch.uninstall.required_by.advice=Para prosseguir será necessário desinstá-lo arch.uninstall.unnecessary.all=Os seguintes {} pacotes serão desinstalados arch.uninstall.unnecessary.cancel=Manter arch.uninstall.unnecessary.l1=Pacotes desinstalados com sucesso! -arch.uninstall.unnecessary.l2=Os pacotes abaixo parecem não ser mais necessários. Selecione os desejados para desinstalação +arch.uninstall.unnecessary.l2=Os pacotes abaixo parecem não ser mais necessários arch.uninstall.unnecessary.proceed=Desinstalar arch.uninstalling.conflict=Desinstalando pacotes conflitante arch.uninstalling.conflict.fail=Não foi possível desinstalar os pacotes conflitantes: {} diff --git a/bauh/gems/arch/resources/locale/ru b/bauh/gems/arch/resources/locale/ru index c43bc763..b964821c 100644 --- a/bauh/gems/arch/resources/locale/ru +++ b/bauh/gems/arch/resources/locale/ru @@ -218,7 +218,7 @@ arch.uninstall.required_by.advice=It is necessary to uninstall them as well to p arch.uninstall.unnecessary.all=The following {} packages will be uninstalled arch.uninstall.unnecessary.cancel=Keep arch.uninstall.unnecessary.l1=Packages successfully uninstalled! -arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary. Select those you want to uninstall +arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary arch.uninstall.unnecessary.proceed=Uninstall arch.uninstalling.conflict=Uninstalling conflicting packages arch.uninstalling.conflict.fail=It was not possible to uninstall the conflicting packages: {} diff --git a/bauh/gems/arch/resources/locale/tr b/bauh/gems/arch/resources/locale/tr index baeab0f8..1c2550c0 100644 --- a/bauh/gems/arch/resources/locale/tr +++ b/bauh/gems/arch/resources/locale/tr @@ -218,7 +218,7 @@ arch.uninstall.required_by.advice=Devam etmek için bunları da kaldırmak gerek arch.uninstall.unnecessary.all=Aşağıdaki {} paketler kaldırılacak arch.uninstall.unnecessary.cancel=Tut arch.uninstall.unnecessary.l1=Packages successfully uninstalled! -arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary. Select those you want to uninstall +arch.uninstall.unnecessary.l2=The packages below seem to be no longer necessary arch.uninstall.unnecessary.proceed=Kaldır arch.uninstalling.conflict=Uninstalling conflicting packages arch.uninstalling.conflict.fail=It was not possible to uninstall the conflicting packages: {} diff --git a/bauh/view/qt/confirmation.py b/bauh/view/qt/confirmation.py index 85bc8410..d7ccc4d4 100644 --- a/bauh/view/qt/confirmation.py +++ b/bauh/view/qt/confirmation.py @@ -1,6 +1,7 @@ from typing import List from PyQt5.QtCore import QSize, Qt +from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import QMessageBox, QVBoxLayout, QLabel, QWidget, QScrollArea, QFrame from bauh.api.abstract.view import ViewComponent @@ -25,11 +26,13 @@ class ConfirmationDialog(QMessageBox): self.bt_yes = None if confirmation_button: self.bt_yes = self.addButton(i18n['popup.button.yes'] if not confirmation_label else confirmation_label.capitalize(), QMessageBox.YesRole) + self.bt_yes.setCursor(QCursor(Qt.PointingHandCursor)) self.bt_yes.setStyleSheet(css.OK_BUTTON) self.setDefaultButton(self.bt_yes) if deny_button: self.bt_no = self.addButton(i18n['popup.button.no'] if not deny_label else deny_label.capitalize(), QMessageBox.NoRole) + self.bt_no.setCursor(QCursor(Qt.PointingHandCursor)) if not confirmation_button: self.bt_no.setStyleSheet(css.OK_BUTTON) diff --git a/bauh/view/qt/dialog.py b/bauh/view/qt/dialog.py index 62cad49a..b6ae292f 100644 --- a/bauh/view/qt/dialog.py +++ b/bauh/view/qt/dialog.py @@ -1,7 +1,7 @@ from typing import List from PyQt5.QtCore import Qt -from PyQt5.QtGui import QIcon +from PyQt5.QtGui import QIcon, QCursor from PyQt5.QtWidgets import QMessageBox, QLabel, QWidget, QHBoxLayout from bauh.api.abstract.view import MessageType @@ -47,9 +47,11 @@ def ask_confirmation(title: str, body: str, i18n: I18n, icon: QIcon = QIcon(reso bt_yes = diag.addButton(i18n['popup.button.yes'], QMessageBox.YesRole) bt_yes.setStyleSheet(css.OK_BUTTON) + bt_yes.setCursor(QCursor(Qt.PointingHandCursor)) diag.setDefaultButton(bt_yes) - diag.addButton(i18n['popup.button.no'], QMessageBox.NoRole) + bt_no = diag.addButton(i18n['popup.button.no'], QMessageBox.NoRole) + bt_no.setCursor(QCursor(Qt.PointingHandCursor)) if icon: diag.setWindowIcon(icon)