[feature] new custom action to open the system backup tool

This commit is contained in:
Vinicius Moreira
2020-06-04 12:16:53 -03:00
parent 9dcfa89e24
commit 44d70f5efd
12 changed files with 59 additions and 1 deletions

View File

@@ -1252,7 +1252,19 @@ class ManageWindow(QWidget):
def _map_custom_action(self, action: CustomSoftwareAction) -> QAction:
custom_action = QAction(self.i18n[action.i18_label_key])
custom_action.setIcon(QIcon(action.icon_path))
if action.icon_path:
try:
if action.icon_path.startswith('/'):
icon = QIcon(action.icon_path)
else:
icon = QIcon.fromTheme(action.icon_path)
custom_action.setIcon(icon)
except:
pass
custom_action.triggered.connect(lambda: self.execute_custom_action(None, action))
return custom_action