diff options
Diffstat (limited to 'desktop/modules/sonix/BootlogoTab.qml')
| -rw-r--r-- | desktop/modules/sonix/BootlogoTab.qml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/desktop/modules/sonix/BootlogoTab.qml b/desktop/modules/sonix/BootlogoTab.qml index 799f4fe..70c9fdd 100644 --- a/desktop/modules/sonix/BootlogoTab.qml +++ b/desktop/modules/sonix/BootlogoTab.qml @@ -74,7 +74,9 @@ Row { // The wait for Wi-Fi transfer is capped by time, 60s from the click. property real deadline: 0 - function upload() { tab.save(file => { tab.deadline = Date.now() + 60000; tab.send(file); }); } + function upload() { tab.save(file => tab.uploadFile(file)); } + // Also for a logo saved earlier, picked from the output folder. + function uploadFile(file) { tab.deadline = Date.now() + 60000; tab.send(file); } function send(file) { tab.busy = true; Sonix.upload(file, tab.cardDir, (code, out) => { @@ -312,10 +314,15 @@ Row { } Button { text: "Change…"; onClicked: pickFolder.open() } } + Button { + text: "Upload saved…" + enabled: Sonix.present && !tab.busy && !tab.waiting + onClicked: pickSaved.open() + } Text { width: parent.width wrapMode: Text.Wrap - text: "Save writes the logo and a transparent mask of the text. Upload also sends the logo to the card's Bootlogo folder; Wi-Fi transfer must be open on the player." + text: "Save writes the logo and a transparent mask of the text. Upload also sends the logo to the card's Bootlogo folder; Upload saved sends one saved earlier. Wi-Fi transfer must be open on the player." font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 5 } color: Theme.subtext } @@ -341,4 +348,12 @@ Row { currentFolder: "file://" + tab.folder onAccepted: tab.set({ folder: tab.pathOf(pickFolder.folder) }) } + P.FileDialog { + id: pickSaved + title: "Upload a saved logo" + fileMode: P.FileDialog.OpenFile + folder: "file://" + tab.folder + nameFilters: ["Boot logos (bootlogo-*.png)", "Pictures (*.png *.jpg *.jpeg *.PNG *.JPG *.JPEG)"] + onAccepted: tab.uploadFile(tab.pathOf(pickSaved.file)) + } } |
