Add a button to export the addon list (issue #2)

This commit is contained in:
woblight
2024-07-28 18:09:51 +02:00
parent c605139fef
commit a0fdd98a8f
6 changed files with 60 additions and 12 deletions
+14
View File
@@ -89,6 +89,14 @@ ApplicationWindow {
onTriggered: addDialog.visible = true
shortcut: StandardKey.New
}
Action {
id: exportList
icon.name: "export-symbolic"
onTriggered: exportListDialog.visible = true
enabled: Control.status == Control.Ready && addonsReady
shortcut: StandardKey.SaveAs
}
Action {
id: updateAllAction
onTriggered: updateAll()
@@ -412,4 +420,10 @@ ApplicationWindow {
closePolicy: Engine.updateStatus !== Engine.DownloadingUpdate ? Dialog.CloseOnPressOutside | Dialog.CloseOnEscape : Dialog.NoAutoClose
standardButtons: Engine.updateStatus !== Engine.DownloadingUpdate ? Dialog.Close : Dialog.NoButton
}
FileDialog {
id: exportListDialog
onAccepted: Engine.exportAddonList(selectedFile)
fileMode: FileDialog.SaveFile
defaultSuffix: "txt"
}
}