Add message to restart server after config change

This commit is contained in:
Patrick Nicolas
2025-11-19 14:16:15 +01:00
parent 01c4f0343a
commit 7c2057ec9e
9 changed files with 115 additions and 68 deletions
+7 -11
View File
@@ -38,10 +38,6 @@ ColumnLayout {
id: apps
}
Settings {
id: config
}
Connections {
target: WivrnServer
function onJsonConfigurationChanged() {
@@ -88,7 +84,7 @@ ColumnLayout {
if (select_game.json_loaded || WivrnServer.serverStatus != WivrnServer.Started || WivrnServer.jsonConfiguration == "")
return;
config.load(WivrnServer);
Settings.load(WivrnServer);
var found = false;
var custom_idx = -1;
@@ -96,7 +92,7 @@ ColumnLayout {
var app = apps.get(i);
if (app.is_custom)
custom_idx = i;
else if (app.command == config.application) {
else if (app.command == Settings.application) {
app_combobox.currentIndex = i;
found = true;
break;
@@ -104,7 +100,7 @@ ColumnLayout {
}
if (!found) {
app_text.text = config.application;
app_text.text = Settings.application;
app_combobox.currentIndex = custom_idx;
}
@@ -119,10 +115,10 @@ ColumnLayout {
else
new_application = apps.get(app_combobox.currentIndex).command;
config.load(WivrnServer);
if (config.application != new_application) {
config.application = new_application;
config.save(WivrnServer);
Settings.load(WivrnServer);
if (Settings.application != new_application) {
Settings.application = new_application;
Settings.save(WivrnServer);
}
}
}