1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-23 12:57:45 +00:00

Make FormFileDelegate functional

This commit is contained in:
Joshua Goins 2024-01-31 16:12:39 -05:00
parent f75fb70ac9
commit 9101f78427
2 changed files with 6 additions and 0 deletions

View file

@ -11,6 +11,8 @@ FormCard.FormButtonDelegate {
property string file property string file
signal accepted(string path)
icon.name: "document-open" icon.name: "document-open"
description: file description: file
@ -20,5 +22,7 @@ FormCard.FormButtonDelegate {
id: dialog id: dialog
currentFolder: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0] currentFolder: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]
onAccepted: control.accepted(decodeURIComponent(selectedFile.toString().replace("file://", "")))
} }
} }

View file

@ -99,6 +99,8 @@ FormCard.FormCardPage {
text: i18n("Wine Executable") text: i18n("Wine Executable")
file: page.profile.winePath file: page.profile.winePath
enabled: page.profile.wineType !== Profile.BuiltIn enabled: page.profile.wineType !== Profile.BuiltIn
onAccepted: (path) => page.profile.winePath = path
} }
FormCard.FormDelegateSeparator { FormCard.FormDelegateSeparator {