[fix][arch][uninstall] not displaying removing all unnecessary dependencies

This commit is contained in:
Vinicius Moreira
2020-04-22 12:21:21 -03:00
parent 67542bdca9
commit 700a6ca9ce
13 changed files with 95 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
from typing import List
from PyQt5.QtCore import QSize
from PyQt5.QtCore import QSize, Qt
from PyQt5.QtWidgets import QMessageBox, QVBoxLayout, QLabel, QWidget, QScrollArea, QFrame
from bauh.api.abstract.view import ViewComponent
@@ -12,8 +12,12 @@ from bauh.view.util.translation import I18n
class ConfirmationDialog(QMessageBox):
def __init__(self, title: str, body: str, i18n: I18n, screen_size: QSize, components: List[ViewComponent] = None,
confirmation_label: str = None, deny_label: str = None, deny_button: bool = True):
confirmation_label: str = None, deny_label: str = None, deny_button: bool = True, window_cancel: bool = True):
super(ConfirmationDialog, self).__init__()
if not window_cancel:
self.setWindowFlags(Qt.CustomizeWindowHint | Qt.WindowTitleHint)
self.setWindowTitle(title)
self.setStyleSheet('QLabel { margin-right: 25px; }')
self.bt_yes = self.addButton(i18n['popup.button.yes'] if not confirmation_label else confirmation_label.capitalize(), QMessageBox.YesRole)

View File

@@ -49,9 +49,10 @@ class AsyncAction(QThread, ProcessWatcher):
self.root_password = None
self.stop = False
def request_confirmation(self, title: str, body: str, components: List[ViewComponent] = None, confirmation_label: str = None, deny_label: str = None, deny_button: bool = True) -> bool:
def request_confirmation(self, title: str, body: str, components: List[ViewComponent] = None,
confirmation_label: str = None, deny_label: str = None, deny_button: bool = True, window_cancel: bool = True) -> bool:
self.wait_confirmation = True
self.signal_confirmation.emit({'title': title, 'body': body, 'components': components, 'confirmation_label': confirmation_label, 'deny_label': deny_label, 'deny_button': deny_button})
self.signal_confirmation.emit({'title': title, 'body': body, 'components': components, 'confirmation_label': confirmation_label, 'deny_label': deny_label, 'deny_button': deny_button, 'window_cancel': window_cancel})
self.wait_user()
return self.confirmation_res

View File

@@ -445,6 +445,7 @@ class ManageWindow(QWidget):
confirmation_label=msg['confirmation_label'],
deny_label=msg['deny_label'],
deny_button=msg['deny_button'],
window_cancel=msg['window_cancel'],
screen_size=self.screen_size)
res = diag.is_confirmed()
self.thread_animate_progress.animate()