mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-19 00:15:21 +01:00
Shift+Ctrl+X option screen: allow persisting settings
This commit is contained in:
parent
a6150f7bc5
commit
abbed47f97
6 changed files with 355 additions and 34 deletions
27
main.qml
27
main.qml
|
@ -188,10 +188,15 @@ ApplicationWindow {
|
|||
Material.background: "#ffffff"
|
||||
Material.foreground: "#c51a4a"
|
||||
onClicked: {
|
||||
if (!imageWriter.readyToWrite())
|
||||
return;
|
||||
if (!imageWriter.readyToWrite()) {
|
||||
return
|
||||
}
|
||||
|
||||
confirmwritepopup.askForConfirmation()
|
||||
if (!optionspopup.initialized && imageWriter.hasSavedCustomizationSettings()) {
|
||||
usesavedsettingspopup.openPopup()
|
||||
} else {
|
||||
confirmwritepopup.askForConfirmation()
|
||||
}
|
||||
}
|
||||
Accessible.onPressAction: clicked()
|
||||
}
|
||||
|
@ -790,6 +795,22 @@ ApplicationWindow {
|
|||
id: optionspopup
|
||||
}
|
||||
|
||||
UseSavedSettingsPopup {
|
||||
id: usesavedsettingspopup
|
||||
onYes: {
|
||||
optionspopup.initialize()
|
||||
optionspopup.applySettings()
|
||||
confirmwritepopup.askForConfirmation()
|
||||
}
|
||||
onNo: {
|
||||
imageWriter.clearSavedCustomizationSettings()
|
||||
confirmwritepopup.askForConfirmation()
|
||||
}
|
||||
onEditSettings: {
|
||||
optionspopup.openPopup()
|
||||
}
|
||||
}
|
||||
|
||||
/* Utility functions */
|
||||
function httpRequest(url, callback) {
|
||||
var xhr = new XMLHttpRequest();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue