mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
Merge pull request #677 from tdewey-rpi/dev/shared/os-customization
OS customization rebrand, consistency
This commit is contained in:
commit
338b71112e
21 changed files with 193 additions and 144 deletions
|
@ -197,8 +197,8 @@ On macOS, disable it by editing the property list for the application:
|
||||||
defaults write org.raspberrypi.Imager.plist telemetry -bool NO
|
defaults write org.raspberrypi.Imager.plist telemetry -bool NO
|
||||||
```
|
```
|
||||||
|
|
||||||
### Advanced options
|
### OS Customization
|
||||||
|
|
||||||
When using the app, press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>X</kbd> to reveal the **Advanced options** dialog.
|
When using the app, press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>X</kbd> to reveal the **OS Customization** dialog.
|
||||||
|
|
||||||
In here, you can specify several things you would otherwise set in the boot configuration files. For example, you can enable SSH, set the Wi-Fi login, and specify your locale settings for the system image.
|
In here, you can specify several things you would otherwise set in the boot configuration files. For example, you can enable SSH, set the Wi-Fi login, and specify your locale settings for the system image.
|
||||||
|
|
|
@ -24,6 +24,6 @@ index 568d1cd..9e36607 100644
|
||||||
+ function raise() { }
|
+ function raise() { }
|
||||||
+ /* */
|
+ /* */
|
||||||
+
|
+
|
||||||
title: qsTr("Advanced options")
|
title: qsTr("OS Customization")
|
||||||
|
|
||||||
property bool initialized: false
|
property bool initialized: false
|
||||||
|
|
|
@ -17,7 +17,7 @@ Window {
|
||||||
maximumWidth: width
|
maximumWidth: width
|
||||||
minimumHeight: 125
|
minimumHeight: 125
|
||||||
height: Math.min(750, cl.implicitHeight)
|
height: Math.min(750, cl.implicitHeight)
|
||||||
title: qsTr("Advanced options")
|
title: qsTr("OS Customization")
|
||||||
|
|
||||||
property bool initialized: false
|
property bool initialized: false
|
||||||
property bool hasSavedSettings: false
|
property bool hasSavedSettings: false
|
||||||
|
@ -29,6 +29,8 @@ Window {
|
||||||
property string cloudinitwrite
|
property string cloudinitwrite
|
||||||
property string cloudinitnetwork
|
property string cloudinitnetwork
|
||||||
|
|
||||||
|
signal saveSettingsSignal(var settings)
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: cl
|
id: cl
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
@ -46,23 +48,6 @@ Window {
|
||||||
//ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
//ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Label {
|
|
||||||
text: qsTr("Image customization options")
|
|
||||||
}
|
|
||||||
ComboBox {
|
|
||||||
id: comboSaveSettings
|
|
||||||
model: {
|
|
||||||
[qsTr("for this session only"),
|
|
||||||
qsTr("to always use")]
|
|
||||||
}
|
|
||||||
Layout.minimumWidth: 250
|
|
||||||
Layout.maximumHeight: 40
|
|
||||||
enabled: !imageWriter.isEmbeddedMode()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TabBar {
|
TabBar {
|
||||||
id: bar
|
id: bar
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
@ -453,7 +438,6 @@ Window {
|
||||||
fieldKeyboardLayout.model = imageWriter.getKeymapLayoutList()
|
fieldKeyboardLayout.model = imageWriter.getKeymapLayoutList()
|
||||||
|
|
||||||
if (Object.keys(settings).length) {
|
if (Object.keys(settings).length) {
|
||||||
comboSaveSettings.currentIndex = 1
|
|
||||||
hasSavedSettings = true
|
hasSavedSettings = true
|
||||||
}
|
}
|
||||||
if ('hostname' in settings) {
|
if ('hostname' in settings) {
|
||||||
|
@ -539,7 +523,7 @@ Window {
|
||||||
/* Lacking an easy cross-platform to fetch keyboard layout
|
/* Lacking an easy cross-platform to fetch keyboard layout
|
||||||
from host system, just default to "gb" for people in
|
from host system, just default to "gb" for people in
|
||||||
UK time zone for now, and "us" for everyone else */
|
UK time zone for now, and "us" for everyone else */
|
||||||
if (tz == "Europe/London") {
|
if (tz === "Europe/London") {
|
||||||
fieldKeyboardLayout.currentIndex = fieldKeyboardLayout.find("gb")
|
fieldKeyboardLayout.currentIndex = fieldKeyboardLayout.find("gb")
|
||||||
} else {
|
} else {
|
||||||
fieldKeyboardLayout.currentIndex = fieldKeyboardLayout.find("us")
|
fieldKeyboardLayout.currentIndex = fieldKeyboardLayout.find("us")
|
||||||
|
@ -807,8 +791,6 @@ Window {
|
||||||
|
|
||||||
function saveSettings()
|
function saveSettings()
|
||||||
{
|
{
|
||||||
if (comboSaveSettings.currentIndex == 1) {
|
|
||||||
hasSavedSettings = true
|
|
||||||
var settings = { };
|
var settings = { };
|
||||||
if (chkHostname.checked && fieldHostname.length) {
|
if (chkHostname.checked && fieldHostname.length) {
|
||||||
settings.hostname = fieldHostname.text
|
settings.hostname = fieldHostname.text
|
||||||
|
@ -835,15 +817,59 @@ Window {
|
||||||
settings.keyboardLayout = fieldKeyboardLayout.editText
|
settings.keyboardLayout = fieldKeyboardLayout.editText
|
||||||
}
|
}
|
||||||
|
|
||||||
imageWriter.setSavedCustomizationSettings(settings)
|
|
||||||
|
|
||||||
} else if (hasSavedSettings) {
|
|
||||||
imageWriter.clearSavedCustomizationSettings()
|
|
||||||
hasSavedSettings = false
|
|
||||||
}
|
|
||||||
|
|
||||||
imageWriter.setSetting("beep", chkBeep.checked)
|
imageWriter.setSetting("beep", chkBeep.checked)
|
||||||
imageWriter.setSetting("eject", chkEject.checked)
|
imageWriter.setSetting("eject", chkEject.checked)
|
||||||
imageWriter.setSetting("telemetry", chkTelemtry.checked)
|
imageWriter.setSetting("telemetry", chkTelemtry.checked)
|
||||||
|
|
||||||
|
if (chkHostname.checked || chkSetUser.checked || chkSSH.checked || chkWifi.checked || chkLocale.checked) {
|
||||||
|
/* OS customization to be applied. */
|
||||||
|
hasSavedSettings = true
|
||||||
|
saveSettingsSignal(settings)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearCustomizationFields()
|
||||||
|
{
|
||||||
|
/* Bind copies of the lists */
|
||||||
|
fieldTimezone.model = imageWriter.getTimezoneList()
|
||||||
|
fieldKeyboardLayout.model = imageWriter.getKeymapLayoutList()
|
||||||
|
fieldWifiCountry.model = imageWriter.getCountryList()
|
||||||
|
|
||||||
|
fieldHostname.text = "raspberrypi"
|
||||||
|
fieldUserName.text = imageWriter.getCurrentUser()
|
||||||
|
fieldUserPassword.clear()
|
||||||
|
radioPubKeyAuthentication.checked = false
|
||||||
|
radioPasswordAuthentication.checked = false
|
||||||
|
fieldPublicKey.clear()
|
||||||
|
|
||||||
|
/* Timezone Settings*/
|
||||||
|
fieldTimezone.currentIndex = fieldTimezone.find(imageWriter.getTimezone())
|
||||||
|
/* Lacking an easy cross-platform to fetch keyboard layout
|
||||||
|
from host system, just default to "gb" for people in
|
||||||
|
UK time zone for now, and "us" for everyone else */
|
||||||
|
if (imageWriter.getTimezone() === "Europe/London") {
|
||||||
|
fieldKeyboardLayout.currentIndex = fieldKeyboardLayout.find("gb")
|
||||||
|
} else {
|
||||||
|
fieldKeyboardLayout.currentIndex = fieldKeyboardLayout.find("us")
|
||||||
|
}
|
||||||
|
|
||||||
|
chkSetUser.checked = false
|
||||||
|
chkSSH.checked = false
|
||||||
|
chkLocale.checked = false
|
||||||
|
chkWifiSSIDHidden.checked = false
|
||||||
|
chkHostname.checked = false
|
||||||
|
|
||||||
|
/* WiFi Settings */
|
||||||
|
fieldWifiSSID.text = imageWriter.getSSID()
|
||||||
|
if (fieldWifiSSID.text.length) {
|
||||||
|
fieldWifiPassword.text = imageWriter.getPSK()
|
||||||
|
if (fieldWifiPassword.text.length) {
|
||||||
|
chkShowPassword.checked = false
|
||||||
|
if (Qt.platform.os == "osx") {
|
||||||
|
/* User indicated wifi must be prefilled */
|
||||||
|
chkWifi.checked = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,8 @@ Popup {
|
||||||
padding: 0
|
padding: 0
|
||||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||||
|
|
||||||
|
property bool hasSavedSettings: false
|
||||||
|
|
||||||
signal yes()
|
signal yes()
|
||||||
signal no()
|
signal no()
|
||||||
signal noClearSettings()
|
signal noClearSettings()
|
||||||
|
@ -70,7 +72,7 @@ Popup {
|
||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
font.family: roboto.name
|
font.family: roboto.name
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: qsTr("Use image customisation?")
|
text: qsTr("Use OS customization?")
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
@ -85,7 +87,7 @@ Popup {
|
||||||
Layout.topMargin: 25
|
Layout.topMargin: 25
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter
|
||||||
Accessible.name: text.replace(/<\/?[^>]+(>|$)/g, "")
|
Accessible.name: text.replace(/<\/?[^>]+(>|$)/g, "")
|
||||||
text: qsTr("Would you like to apply image customization settings?")
|
text: qsTr("Would you like to apply OS customization settings?")
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
@ -94,38 +96,6 @@ Popup {
|
||||||
spacing: 20
|
spacing: 20
|
||||||
id: buttons
|
id: buttons
|
||||||
|
|
||||||
ImButton {
|
|
||||||
text: qsTr("NO")
|
|
||||||
onClicked: {
|
|
||||||
msgpopup.close()
|
|
||||||
msgpopup.no()
|
|
||||||
}
|
|
||||||
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
|
||||||
Material.background: "#c51a4a"
|
|
||||||
}
|
|
||||||
|
|
||||||
ImButton {
|
|
||||||
text: qsTr("NO, CLEAR SETTINGS")
|
|
||||||
onClicked: {
|
|
||||||
msgpopup.close()
|
|
||||||
msgpopup.noClearSettings()
|
|
||||||
}
|
|
||||||
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
|
||||||
Material.background: "#c51a4a"
|
|
||||||
enabled: imageWriter.hasSavedCustomizationSettings() ? true : false
|
|
||||||
}
|
|
||||||
|
|
||||||
ImButton {
|
|
||||||
text: qsTr("YES")
|
|
||||||
onClicked: {
|
|
||||||
msgpopup.close()
|
|
||||||
msgpopup.yes()
|
|
||||||
}
|
|
||||||
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
|
||||||
Material.background: "#c51a4a"
|
|
||||||
enabled: imageWriter.hasSavedCustomizationSettings() ? true : false
|
|
||||||
}
|
|
||||||
|
|
||||||
ImButton {
|
ImButton {
|
||||||
text: qsTr("EDIT SETTINGS")
|
text: qsTr("EDIT SETTINGS")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
@ -136,12 +106,56 @@ Popup {
|
||||||
Material.background: "#c51a4a"
|
Material.background: "#c51a4a"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImButton {
|
||||||
|
id: noAndClearButton
|
||||||
|
text: qsTr("NO, CLEAR SETTINGS")
|
||||||
|
onClicked: {
|
||||||
|
msgpopup.close()
|
||||||
|
msgpopup.noClearSettings()
|
||||||
|
}
|
||||||
|
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
||||||
|
Material.background: "#c51a4a"
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
|
||||||
|
ImButton {
|
||||||
|
id: yesButton
|
||||||
|
text: qsTr("YES")
|
||||||
|
onClicked: {
|
||||||
|
msgpopup.close()
|
||||||
|
msgpopup.yes()
|
||||||
|
}
|
||||||
|
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
||||||
|
Material.background: "#c51a4a"
|
||||||
|
enabled: false
|
||||||
|
}
|
||||||
|
|
||||||
|
ImButton {
|
||||||
|
text: qsTr("NO")
|
||||||
|
onClicked: {
|
||||||
|
msgpopup.close()
|
||||||
|
msgpopup.no()
|
||||||
|
}
|
||||||
|
Material.foreground: activeFocus ? "#d1dcfb" : "#ffffff"
|
||||||
|
Material.background: "#c51a4a"
|
||||||
|
}
|
||||||
|
|
||||||
Text { text: " " }
|
Text { text: " " }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openPopup() {
|
function openPopup() {
|
||||||
open()
|
open()
|
||||||
|
if (hasSavedSettings) {
|
||||||
|
/* HACK: Bizarrely, the button enabled characteristics are not re-evaluated on open.
|
||||||
|
* So, let's manually _force_ these buttons to be enabled */
|
||||||
|
yesButton.enabled = true
|
||||||
|
noAndClearButton.enabled = true
|
||||||
|
} else {
|
||||||
|
yesButton.enabled = false
|
||||||
|
noAndClearButton.enabled = false
|
||||||
|
}
|
||||||
|
|
||||||
// trigger screen reader to speak out message
|
// trigger screen reader to speak out message
|
||||||
msgpopupbody.forceActiveFocus()
|
msgpopupbody.forceActiveFocus()
|
||||||
}
|
}
|
||||||
|
|
|
@ -282,13 +282,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Opcions avançades</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Opcions de personalització de les imatges</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -319,13 +319,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Erweiterte Optionen</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>OS-Modifizierungen</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -278,12 +278,12 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -282,13 +282,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Opciones avanzadas</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Opciones de personalización de imagen</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -318,13 +318,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Réglages avancés</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Options de personnalisation de l'image</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -319,13 +319,13 @@ Aggiungi sia 'rpi-imager.exe' che 'fat32format.exe' all&apos
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Opzioni avanzate</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Opzioni personalizzazione immagine</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -318,13 +318,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>詳細な設定</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>イメージカスタマイズオプション</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -318,13 +318,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>고급 옵션</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>이미지 사용자 정의 옵션</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -318,13 +318,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Geavanceerde instellingen</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Image instellingen</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -318,13 +318,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Дополнительные параметры</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Параметры настройки образа</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -318,13 +318,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Pokročilé možnosti</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Možnosti úprav obrazu</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -318,13 +318,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Napredne možnosti</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Uporabi opcije prilagoditve slike diska</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -290,12 +290,12 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
|
|
@ -282,13 +282,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>Розширені налаштування</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>Налаштування образу</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -306,13 +306,13 @@
|
||||||
<name>OptionsPopup</name>
|
<name>OptionsPopup</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="20"/>
|
<location filename="../OptionsPopup.qml" line="20"/>
|
||||||
<source>Advanced options</source>
|
<source>OS customization</source>
|
||||||
<translation>高级设置</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="52"/>
|
<location filename="../OptionsPopup.qml" line="52"/>
|
||||||
<source>Image customization options</source>
|
<source>OS customization options</source>
|
||||||
<translation>镜像自定义选项</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../OptionsPopup.qml" line="57"/>
|
<location filename="../OptionsPopup.qml" line="57"/>
|
||||||
|
|
|
@ -1039,6 +1039,7 @@ void ImageWriter::setSavedCustomizationSettings(const QVariantMap &map)
|
||||||
_settings.setValue(key, map.value(key));
|
_settings.setValue(key, map.value(key));
|
||||||
}
|
}
|
||||||
_settings.endGroup();
|
_settings.endGroup();
|
||||||
|
_settings.sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantMap ImageWriter::getSavedCustomizationSettings()
|
QVariantMap ImageWriter::getSavedCustomizationSettings()
|
||||||
|
@ -1060,10 +1061,12 @@ void ImageWriter::clearSavedCustomizationSettings()
|
||||||
_settings.beginGroup("imagecustomization");
|
_settings.beginGroup("imagecustomization");
|
||||||
_settings.remove("");
|
_settings.remove("");
|
||||||
_settings.endGroup();
|
_settings.endGroup();
|
||||||
|
_settings.sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ImageWriter::hasSavedCustomizationSettings()
|
bool ImageWriter::hasSavedCustomizationSettings()
|
||||||
{
|
{
|
||||||
|
_settings.sync();
|
||||||
_settings.beginGroup("imagecustomization");
|
_settings.beginGroup("imagecustomization");
|
||||||
bool result = !_settings.childKeys().isEmpty();
|
bool result = !_settings.childKeys().isEmpty();
|
||||||
_settings.endGroup();
|
_settings.endGroup();
|
||||||
|
|
|
@ -1183,6 +1183,10 @@ ApplicationWindow {
|
||||||
|
|
||||||
OptionsPopup {
|
OptionsPopup {
|
||||||
id: optionspopup
|
id: optionspopup
|
||||||
|
onSaveSettingsSignal: {
|
||||||
|
imageWriter.setSavedCustomizationSettings(settings)
|
||||||
|
usesavedsettingspopup.hasSavedSettings = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UseSavedSettingsPopup {
|
UseSavedSettingsPopup {
|
||||||
|
@ -1196,6 +1200,8 @@ ApplicationWindow {
|
||||||
confirmwritepopup.askForConfirmation()
|
confirmwritepopup.askForConfirmation()
|
||||||
}
|
}
|
||||||
onNoClearSettings: {
|
onNoClearSettings: {
|
||||||
|
hasSavedSettings = false
|
||||||
|
optionspopup.clearCustomizationFields()
|
||||||
imageWriter.clearSavedCustomizationSettings()
|
imageWriter.clearSavedCustomizationSettings()
|
||||||
confirmwritepopup.askForConfirmation()
|
confirmwritepopup.askForConfirmation()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue