fix: info popup app name

This commit is contained in:
Vinicius Moreira
2019-08-09 18:16:53 -03:00
parent 8a5092d631
commit 7af8e89325

View File

@@ -1,4 +1,5 @@
from PyQt5.QtCore import QSize from PyQt5.QtCore import QSize
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QDialog, QVBoxLayout, QFormLayout, QGroupBox, \ from PyQt5.QtWidgets import QDialog, QVBoxLayout, QFormLayout, QGroupBox, \
QLineEdit, QLabel QLineEdit, QLabel
from fpakman_api.util.cache import Cache from fpakman_api.util.cache import Cache
@@ -12,7 +13,7 @@ class InfoDialog(QDialog):
def __init__(self, app: dict, icon_cache: Cache, locale_keys: dict, screen_size: QSize()): def __init__(self, app: dict, icon_cache: Cache, locale_keys: dict, screen_size: QSize()):
super(InfoDialog, self).__init__() super(InfoDialog, self).__init__()
self.setWindowTitle(app['name']) self.setWindowTitle(app['__app__'].model.base_data.name)
self.screen_size = screen_size self.screen_size = screen_size
layout = QVBoxLayout() layout = QVBoxLayout()
self.setLayout(layout) self.setLayout(layout)
@@ -28,6 +29,8 @@ class InfoDialog(QDialog):
if icon_data and icon_data.get('icon'): if icon_data and icon_data.get('icon'):
self.setWindowIcon(icon_data.get('icon')) self.setWindowIcon(icon_data.get('icon'))
else:
self.setWindowIcon(QIcon(app['__app__'].model.get_type_icon_path()))
for attr in sorted(app.keys()): for attr in sorted(app.keys()):
if attr not in IGNORED_ATTRS and app[attr]: if attr not in IGNORED_ATTRS and app[attr]: