mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 06:24:15 +02:00
[debian] initial Debian package management support
This commit is contained in:
@@ -996,6 +996,12 @@ def to_widget(comp: ViewComponent, i18n: I18n, parent: QWidget = None) -> QWidge
|
||||
elif isinstance(comp, TextComponent):
|
||||
label = QLabel(comp.value)
|
||||
|
||||
if comp.min_width is not None and comp.min_width > 0:
|
||||
label.setMinimumWidth(comp.min_width)
|
||||
|
||||
if comp.max_width is not None and comp.max_width > 0:
|
||||
label.setMinimumWidth(comp.max_width)
|
||||
|
||||
if comp.size is not None:
|
||||
label.setStyleSheet("QLabel { font-size: " + str(comp.size) + "px }")
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from collections.abc import Iterable
|
||||
|
||||
from PyQt5.QtCore import QSize, Qt
|
||||
from PyQt5.QtGui import QIcon, QCursor
|
||||
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QGroupBox, \
|
||||
@@ -53,8 +55,9 @@ class InfoDialog(QDialog):
|
||||
for idx, attr in enumerate(sorted(pkg_info.keys())):
|
||||
if attr not in IGNORED_ATTRS and pkg_info[attr]:
|
||||
i18n_key = pkg_info['__app__'].model.gem_name + '.info.' + attr.lower()
|
||||
val = pkg_info[attr]
|
||||
|
||||
if isinstance(pkg_info[attr], list):
|
||||
if not isinstance(val, str) and isinstance(pkg_info[attr], Iterable):
|
||||
val = ' '.join([str(e).strip() for e in pkg_info[attr] if e])
|
||||
show_val = '\n'.join(['* ' + str(e).strip() for e in pkg_info[attr] if e])
|
||||
else:
|
||||
|
||||
@@ -529,8 +529,9 @@ class UpgradeSelected(AsyncAction):
|
||||
self.change_substatus('')
|
||||
|
||||
if success:
|
||||
updated = len(requirements.to_upgrade)
|
||||
updated_types.update((req.pkg.__class__ for req in requirements.to_upgrade))
|
||||
if requirements.to_upgrade:
|
||||
updated = len(requirements.to_upgrade)
|
||||
updated_types.update((req.pkg.__class__ for req in requirements.to_upgrade))
|
||||
|
||||
if should_trim:
|
||||
self._trim_disk(root_password)
|
||||
|
||||
Reference in New Issue
Block a user