diff --git a/CHANGELOG.md b/CHANGELOG.md index 797c8053..8194c508 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Adding expiration time for cached app data. Default to 1 hour. The environment variable **FPAKMAN_CACHE_EXPIRATION** can change this value. - Minor GUI improvements - Notifying only new updates +- New icon ## [0.2.1] - 2019-06-24 ### Features diff --git a/aur/desktop_entry.py b/aur/desktop_entry.py index 6d40717c..080ffa72 100644 --- a/aur/desktop_entry.py +++ b/aur/desktop_entry.py @@ -10,7 +10,7 @@ Name = fpakman Categories = System; Comment = Manage your Flatpak applications Exec = /usr/bin/fpakman -Icon = /usr/lib/python{version}/site-packages/fpakman/resources/img/flathub_45.svg +Icon = /usr/lib/python{version}/site-packages/fpakman/resources/img/logo.svg """.format(version="{}.{}".format(sys.version_info.major, sys.version_info.minor)) with open('fpakman.desktop', 'w+') as f: diff --git a/fpakman/app.py b/fpakman/app.py index 081e0460..7c986695 100755 --- a/fpakman/app.py +++ b/fpakman/app.py @@ -18,7 +18,7 @@ args = parser.parse_args() locale_keys = util.get_locale_keys(os.getenv('FPAKMAN_LOCALE', None)) app = QApplication(sys.argv) -app.setWindowIcon(QIcon(resource.get_path('img/flathub_45.svg'))) +app.setWindowIcon(QIcon(resource.get_path('img/logo.svg'))) manager = FlatpakManager(cache_expire=int(os.getenv('FPAKMAN_CACHE_EXPIRATION', 60 * 60))) diff --git a/fpakman/core/system.py b/fpakman/core/system.py index 937a27bb..ae39009d 100644 --- a/fpakman/core/system.py +++ b/fpakman/core/system.py @@ -14,6 +14,6 @@ def stream_cmd(cmd: List[str]): return subprocess.Popen(cmd, stdout=subprocess.PIPE, env={'LANG': 'en'}).stdout -def notify_user(msg: str, icon_path: str = resource.get_path('img/flathub_45.svg')): +def notify_user(msg: str, icon_path: str = resource.get_path('img/logo.svg')): if bool(os.getenv('FPAKMAN_UPDATE_NOTIFICATION', 1)): os.system("notify-send {} '{}'".format("-i {}".format(icon_path) if icon_path else '', msg)) diff --git a/fpakman/resources/img/flathub_45.svg b/fpakman/resources/img/flathub.svg similarity index 96% rename from fpakman/resources/img/flathub_45.svg rename to fpakman/resources/img/flathub.svg index 2c72e02e..1b44a5d4 100755 --- a/fpakman/resources/img/flathub_45.svg +++ b/fpakman/resources/img/flathub.svg @@ -9,13 +9,13 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="43.449291" - height="41.737198" - viewBox="0 0 11.495958 11.042967" + width="47.919052" + height="48.110374" + viewBox="0 0 12.678582 12.729203" version="1.1" id="svg3871" - inkscape:version="0.92.4 5da689c313, 2019-01-14" - sodipodi:docname="flathub_logo.svg"> + inkscape:version="0.92.3 (2405546, 2018-03-11)" + sodipodi:docname="flathub.svg"> + transform="translate(-12.122116,-167.33593)"> + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Layer 1 \ No newline at end of file diff --git a/fpakman/resources/img/logo_update.svg b/fpakman/resources/img/logo_update.svg new file mode 100755 index 00000000..2391fa85 --- /dev/null +++ b/fpakman/resources/img/logo_update.svg @@ -0,0 +1,473 @@ + + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fpakman/resources/img/update.svg b/fpakman/resources/img/update.svg deleted file mode 100755 index 3dfbb01c..00000000 --- a/fpakman/resources/img/update.svg +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - image/svg+xml - - - - - - - - - - - - diff --git a/fpakman/resources/locale/en b/fpakman/resources/locale/en index 27d90a57..12881b09 100644 --- a/fpakman/resources/locale/en +++ b/fpakman/resources/locale/en @@ -42,7 +42,7 @@ tray.action.manage=Manage applications tray.action.exit=Exit tray.action.about=About tray.action.refreshing=Refreshing -notification.new_updates=Updates found +notification.new_updates={} updates flatpak.info.arch=arch flatpak.info.branch=branch flatpak.info.collection=collection diff --git a/fpakman/resources/locale/es b/fpakman/resources/locale/es index bf6d19c3..fd0987de 100644 --- a/fpakman/resources/locale/es +++ b/fpakman/resources/locale/es @@ -42,7 +42,7 @@ tray.action.manage=Administrar aplicativos tray.action.exit=Salir tray.action.about=Sobre tray.action.refreshing=Recargando -notification.new_updates=Actualizaciones encontradas +notification.new_updates=Actualizaciones {} flatpak.info.arch=arquitectura flatpak.info.branch=rama flatpak.info.collection=colección diff --git a/fpakman/resources/locale/pt b/fpakman/resources/locale/pt index 8d30767c..94c9477f 100644 --- a/fpakman/resources/locale/pt +++ b/fpakman/resources/locale/pt @@ -42,7 +42,7 @@ tray.action.manage=Gerenciar aplicativos tray.action.exit=Sair tray.action.about=Sobre tray.action.refreshing=Recarregando -notification.new_updates=Atualizações encontradas +notification.new_updates=Atualizações {} flatpak.info.arch=arquitetura flatpak.info.branch=ramo flatpak.info.collection=coleção diff --git a/fpakman/view/qt/about.py b/fpakman/view/qt/about.py index 4b0652b6..b9e319db 100644 --- a/fpakman/view/qt/about.py +++ b/fpakman/view/qt/about.py @@ -18,7 +18,7 @@ class AboutDialog(QDialog): self.setLayout(layout) label_logo = QLabel(self) - label_logo.setPixmap(QPixmap(resource.get_path('img/flathub_45.svg'))) + label_logo.setPixmap(QPixmap(resource.get_path('img/logo.svg'))) label_logo.setAlignment(Qt.AlignCenter) layout.addWidget(label_logo) @@ -27,13 +27,6 @@ class AboutDialog(QDialog): label_name.setAlignment(Qt.AlignCenter) layout.addWidget(label_name) - label_flathub = QLabel() - label_flathub.setStyleSheet('font-size: 7px; color: red; font-weight: bold;') - label_flathub.setText('* logo by Flathub (' + " {url} )".format(url='https://flathub.org')) - label_flathub.setOpenExternalLinks(True) - label_flathub.setAlignment(Qt.AlignRight) - layout.addWidget(label_flathub) - layout.addWidget(QLabel('')) line_desc = QLabel(self) diff --git a/fpakman/view/qt/apps_table.py b/fpakman/view/qt/apps_table.py index 4853b384..74f64f6f 100644 --- a/fpakman/view/qt/apps_table.py +++ b/fpakman/view/qt/apps_table.py @@ -55,7 +55,7 @@ class AppsTable(QTableWidget): self.setSelectionBehavior(QTableView.SelectRows) self.setHorizontalHeaderLabels(self.column_names) self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff) - self.icon_flathub = QIcon(resource.get_path('img/flathub_45.svg')) + self.icon_flathub = QIcon(resource.get_path('img/flathub.svg')) self.network_man = QNetworkAccessManager() self.network_man.finished.connect(self._load_icon) diff --git a/fpakman/view/qt/dialog.py b/fpakman/view/qt/dialog.py index cc2847be..6b27e6ff 100644 --- a/fpakman/view/qt/dialog.py +++ b/fpakman/view/qt/dialog.py @@ -4,7 +4,7 @@ from PyQt5.QtWidgets import QMessageBox from fpakman.core import resource -def show_error(title: str, body: str, icon: QIcon = QIcon(resource.get_path('img/flathub_45.svg'))): +def show_error(title: str, body: str, icon: QIcon = QIcon(resource.get_path('img/logo.svg'))): error_msg = QMessageBox() error_msg.setIcon(QMessageBox.Critical) error_msg.setWindowTitle(title) @@ -16,7 +16,7 @@ def show_error(title: str, body: str, icon: QIcon = QIcon(resource.get_path('img error_msg.exec_() -def ask_confirmation(title: str, body: str, locale_keys: dict, icon: QIcon = QIcon(resource.get_path('img/flathub_45.svg'))): +def ask_confirmation(title: str, body: str, locale_keys: dict, icon: QIcon = QIcon(resource.get_path('img/logo.svg'))): dialog_confirmation = QMessageBox() dialog_confirmation.setIcon(QMessageBox.Question) dialog_confirmation.setWindowTitle(title) diff --git a/fpakman/view/qt/systray.py b/fpakman/view/qt/systray.py index 1783ddf6..518c52c5 100755 --- a/fpakman/view/qt/systray.py +++ b/fpakman/view/qt/systray.py @@ -54,8 +54,8 @@ class TrayIcon(QSystemTrayIcon): self.locale_keys = locale_keys self.manager = manager - self.icon_default = QIcon(resource.get_path('img/flathub_45.svg')) - self.icon_update = QIcon(resource.get_path('img/update_logo.svg')) + self.icon_default = QIcon(resource.get_path('img/logo.svg')) + self.icon_update = QIcon(resource.get_path('img/logo_update.svg')) self.setIcon(self.icon_default) self.menu = QMenu() @@ -103,7 +103,7 @@ class TrayIcon(QSystemTrayIcon): if update_keys.difference(self.last_updates): self.last_updates = update_keys - msg = '{}: {}'.format(self.locale_keys['notification.new_updates'], len(updates)) + msg = '{}: {}'.format(self.locale_keys['notification.new_updates'].format('Flatpak'), len(updates)) self.setToolTip(msg) system.notify_user(msg) diff --git a/fpakman/view/qt/window.py b/fpakman/view/qt/window.py index d625aad6..90df8f70 100755 --- a/fpakman/view/qt/window.py +++ b/fpakman/view/qt/window.py @@ -33,7 +33,7 @@ class ManageWindow(QWidget): self.apps = [] self.label_flatpak = None - self.icon_flathub = QIcon(resource.get_path('img/flathub_45.svg')) + self.icon_flathub = QIcon(resource.get_path('img/logo.svg')) self._check_flatpak_installed() self.resize(ManageWindow.__BASE_HEIGHT__, ManageWindow.__BASE_HEIGHT__) self.setWindowTitle(locale_keys['manage_window.title'])