mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
about button for manage window
This commit is contained in:
@@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- app information is now available through an "Info" button
|
||||
- app extra actions are now available through a "Settings" button instead of right-click
|
||||
- a confirmation popup is shown when the "install" / "upgrade all" button is clicked
|
||||
- "About" button added to the manage panel
|
||||
- "Updates" icon left-aligned
|
||||
- minor GUI improvements
|
||||
### Fixes:
|
||||
- apps table not showing empty descriptions
|
||||
|
||||
142
fpakman/resources/img/about.svg
Executable file
142
fpakman/resources/img/about.svg
Executable file
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="23.99629"
|
||||
height="24.016451"
|
||||
viewBox="0 0 23.99629 24.016451"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="about.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"><metadata
|
||||
id="metadata933"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs931"><linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient1618"><stop
|
||||
style="stop-color:#0088aa;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop1614" /><stop
|
||||
style="stop-color:#0088aa;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop1616" /></linearGradient>
|
||||
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient1618"
|
||||
id="linearGradient1620"
|
||||
x1="-22.25"
|
||||
y1="-4.4919429"
|
||||
x2="-28.25"
|
||||
y2="9.7580566"
|
||||
gradientUnits="userSpaceOnUse" /></defs><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="739"
|
||||
id="namedview929"
|
||||
showgrid="false"
|
||||
showborder="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="0.50000001"
|
||||
inkscape:cx="-197.75436"
|
||||
inkscape:cy="-20.194417"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="432"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" />
|
||||
|
||||
<g
|
||||
id="g898"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g900"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g902"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g904"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g906"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g908"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g910"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g912"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g914"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g916"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g918"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g920"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g922"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g924"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g926"
|
||||
transform="translate(239.5083,-10.347359)">
|
||||
</g>
|
||||
<g
|
||||
id="g1624"
|
||||
transform="matrix(1.4998882,0,0,1.5002743,1.245458e-5,-1.4011516e-5)"><ellipse
|
||||
ry="7.9742656"
|
||||
rx="7.969605"
|
||||
cy="8.0040293"
|
||||
cx="7.999351"
|
||||
id="path939"
|
||||
style="fill:url(#linearGradient1620);fill-opacity:1;stroke:#4d4d4d;stroke-width:0.05950872" /><path
|
||||
d="m 7.8854557,3.7948064 c 1.4552891,0 2.8880403,0.6706192 2.8880403,2.2746822 0,1.479228 -1.6940807,2.0480998 -2.057903,2.5826085 C 8.442458,9.04969 8.5336818,9.6083603 7.7832313,9.6083603 c -0.4888527,0 -0.7276446,-0.3978613 -0.7276446,-0.7618964 0,-1.3546614 1.9892172,-1.6612455 1.9892172,-2.7767069 0,-0.6139735 -0.408361,-0.9780086 -1.0909303,-0.9780086 -1.4552891,0 -0.887018,1.5012419 -1.9892171,1.5012419 -0.3978971,0 -0.73945,-0.2389316 -0.73945,-0.6937069 -2.683e-4,-1.1157299 1.2728414,-2.104477 2.6602492,-2.104477 z M 7.8288432,10.3469 c 0.5108538,0 0.9323617,0.420413 0.9323617,0.933176 0,0.512763 -0.420703,0.933175 -0.9323617,0.933175 -0.5116586,0 -0.9326299,-0.419875 -0.9326299,-0.933175 0,-0.512495 0.4209713,-0.933176 0.9326299,-0.933176 z"
|
||||
id="path894"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;stroke-width:0.26838395" /></g></svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -110,4 +110,5 @@ uninstall=uninstall
|
||||
bt.app_upgrade=Upgrade
|
||||
bt.app_not_upgrade=Don't upgrade
|
||||
manage_window.upgrade_all.popup.title=Upgrade
|
||||
manage_window.upgrade_all.popup.body=Upgrade all selected applications ?
|
||||
manage_window.upgrade_all.popup.body=Upgrade all selected applications ?
|
||||
manage_window.bt_about.tooltip=About
|
||||
@@ -112,4 +112,5 @@ uninstall=desinstalar
|
||||
bt.app_upgrade=Actualizar
|
||||
bt.app_not_upgrade=No actualizar
|
||||
manage_window.upgrade_all.popup.title=Actualizar
|
||||
manage_window.upgrade_all.popup.body=¿Actualizar todos los aplicativos seleccionados?
|
||||
manage_window.upgrade_all.popup.body=¿Actualizar todos los aplicativos seleccionados?
|
||||
manage_window.bt_about.tooltip=Sobre
|
||||
@@ -112,4 +112,5 @@ uninstall=desinstalar
|
||||
bt.app_upgrade=Atualizar
|
||||
bt.app_not_upgrade=Não atualizar
|
||||
manage_window.upgrade_all.popup.title=Atualizar
|
||||
manage_window.upgrade_all.popup.body=Atualizar todos os aplicativos selecionados ?
|
||||
manage_window.upgrade_all.popup.body=Atualizar todos os aplicativos selecionados ?
|
||||
manage_window.bt_about.tooltip=Sobre
|
||||
@@ -2,7 +2,7 @@ import operator
|
||||
from functools import reduce
|
||||
from typing import List, Set
|
||||
|
||||
from PyQt5.QtCore import QEvent, Qt
|
||||
from PyQt5.QtCore import QEvent, Qt, QSize
|
||||
from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QPixmap
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QApplication, QCheckBox, QHeaderView, QToolButton, QToolBar, \
|
||||
QSizePolicy, QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QHBoxLayout
|
||||
@@ -12,6 +12,7 @@ from fpakman.core.controller import ApplicationManager
|
||||
from fpakman.core.model import Application
|
||||
from fpakman.util.cache import Cache
|
||||
from fpakman.view.qt import dialog
|
||||
from fpakman.view.qt.about import AboutDialog
|
||||
from fpakman.view.qt.apps_table import AppsTable
|
||||
from fpakman.view.qt.history import HistoryDialog
|
||||
from fpakman.view.qt.info import InfoDialog
|
||||
@@ -177,6 +178,10 @@ class ManageWindow(QWidget):
|
||||
self.thread_refresh_app.signal_output.connect(self._update_action_output)
|
||||
|
||||
self.toolbar_bottom = QToolBar()
|
||||
self.toolbar_bottom.setIconSize(QSize(16, 16))
|
||||
|
||||
self.label_updates = QLabel()
|
||||
self.ref_label_updates = self.toolbar_bottom.addWidget(self.label_updates)
|
||||
|
||||
self.toolbar_bottom.addWidget(self._new_spacer())
|
||||
|
||||
@@ -186,8 +191,12 @@ class ManageWindow(QWidget):
|
||||
|
||||
self.toolbar_bottom.addWidget(self._new_spacer())
|
||||
|
||||
self.label_updates = QLabel()
|
||||
self.ref_label_updates = self.toolbar_bottom.addWidget(self.label_updates)
|
||||
bt_about = QToolButton()
|
||||
bt_about.setStyleSheet('border: 0px;')
|
||||
bt_about.setIcon(QIcon(resource.get_path('img/about.svg')))
|
||||
bt_about.clicked.connect(self._show_about)
|
||||
bt_about.setToolTip(self.locale_keys['manage_window.bt_about.tooltip'])
|
||||
self.ref_bt_about = self.toolbar_bottom.addWidget(bt_about)
|
||||
|
||||
self.layout.addWidget(self.toolbar_bottom)
|
||||
|
||||
@@ -198,6 +207,14 @@ class ManageWindow(QWidget):
|
||||
self.filter_updates = False
|
||||
self._maximized = False
|
||||
|
||||
self.dialog_about = None
|
||||
|
||||
def _show_about(self):
|
||||
if self.dialog_about is None:
|
||||
self.dialog_about = AboutDialog(self.locale_keys)
|
||||
|
||||
self.dialog_about.show()
|
||||
|
||||
def _handle_updates_filter(self, status: int):
|
||||
self.filter_updates = status == 2
|
||||
self.apply_filters()
|
||||
@@ -521,6 +538,7 @@ class ManageWindow(QWidget):
|
||||
self.textarea_output.appendPlainText(output)
|
||||
|
||||
def _begin_action(self, action_label: str, keep_search: bool = False, clear_filters: bool = False):
|
||||
self.ref_bt_about.setVisible(False)
|
||||
self.ref_label_updates.setVisible(False)
|
||||
self.thread_animate_progress.stop = False
|
||||
self.thread_animate_progress.start()
|
||||
@@ -544,6 +562,7 @@ class ManageWindow(QWidget):
|
||||
self.extra_filters.setEnabled(False)
|
||||
|
||||
def finish_action(self):
|
||||
self.ref_bt_about.setVisible(True)
|
||||
self.ref_progress_bar.setVisible(False)
|
||||
self.ref_label_updates.setVisible(True)
|
||||
self.thread_animate_progress.stop = True
|
||||
|
||||
Reference in New Issue
Block a user