mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-11-19 01:52:29 +01:00
Reach the setup wizard from the Options menu
Written-by: Codex (GPT-6.2 Sol) Written-by: Claude Fable 5.2
This commit is contained in:
9 files changed
+85
No files matched your search
@@ -537,3 +537,9 @@ wizard.summary.turnedOff=Wird abgeschaltet: Zweitchat.
|
||||
wizard.summary.integrationsUnchanged=Logprogramm, Rotor, AirScout und DX-Cluster-Server behalten ihre gespeicherten Werte. Im Einstellungsfenster prüfen.
|
||||
wizard.summary.none=keine
|
||||
wizard.summary.passwordSet=gesetzt
|
||||
|
||||
menu.setupWizard=Einrichtungsassistent...
|
||||
alert.setupWizardTitle=Einrichtungsassistent
|
||||
alert.setupWizardQuestion=Sitzung beenden und den Einrichtungsassistenten starten?
|
||||
alert.setupWizardBody=Die ON4KST-Verbindung wird geschlossen, und alle Fenster werden nach dem Assistenten neu aufgebaut. Für einzelne Änderungen im laufenden Betrieb ist das Einstellungsfenster da.
|
||||
dialog.startSetupWizard=Assistent starten
|
||||
@@ -546,3 +546,9 @@ wizard.summary.turnedOff=Will be switched off: second chat.
|
||||
wizard.summary.integrationsUnchanged=Log program, rotator, AirScout and DX cluster server keep their stored settings. Check them in the settings window.
|
||||
wizard.summary.none=none
|
||||
wizard.summary.passwordSet=set
|
||||
|
||||
menu.setupWizard=Setup assistant...
|
||||
alert.setupWizardTitle=Setup assistant
|
||||
alert.setupWizardQuestion=End the session and start the setup assistant?
|
||||
alert.setupWizardBody=The ON4KST connection is closed and all windows are rebuilt after the assistant. For single changes during operation use the settings window.
|
||||
dialog.startSetupWizard=Start assistant
|
||||
@@ -4,6 +4,7 @@ import kst4contest.controller.ActiveOperatorProfile;
|
||||
import kst4contest.controller.OperatorProfilePaths;
|
||||
import kst4contest.controller.OperatorProfileStore;
|
||||
import kst4contest.model.OperatorProfile;
|
||||
import kst4contest.model.OperatorProfileSelection;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -82,6 +83,26 @@ public final class ApplicationRuntimeLauncher {
|
||||
return SETUP_WIZARD_REQUESTED.getAndSet(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuilds the runtime of the active profile with the setup wizard in front of it.
|
||||
*
|
||||
* <p>The running runtime is torn down first and the wizard shown afterwards, not the
|
||||
* other way round: a runtime shutting down flushes its pending layout write, and that
|
||||
* must not land on the file the wizard has just written.</p>
|
||||
*
|
||||
* @return true if the new runtime was built
|
||||
*/
|
||||
public static boolean rerunSetupWizard() {
|
||||
OperatorProfileSelection active = ActiveOperatorProfile.get();
|
||||
|
||||
if (active == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
requestSetupWizard();
|
||||
return switchProfile(active.getProfile());
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces the running runtime with one bound to another operator profile.
|
||||
*
|
||||
|
||||
@@ -54,6 +54,11 @@ public final class ComposeMenuActions implements MainMenuActions {
|
||||
application.runOnUi(application::menuActionToggleSettingsWindow);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openSetupWizard() {
|
||||
application.runOnUi(application::menuActionOpenSetupWizard);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toggleMonitorWindow() {
|
||||
application.runOnUi(application::menuActionToggleMonitorWindow);
|
||||
|
||||
@@ -4046,6 +4046,27 @@ public class Kst4ContestApplication implements StatusUpdateListener, SettingsHos
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Options -> setup assistant. Rebuilds the runtime of the active profile with the wizard
|
||||
* in front of it, which costs the running session; hence the question, and hence the
|
||||
* settings edits are settled first, as before a profile switch.
|
||||
*/
|
||||
void menuActionOpenSetupWizard() {
|
||||
SettingsWindow.settleThen(() -> {
|
||||
boolean confirmed = ComposeAlert.confirm(
|
||||
kst4contest.view.i18n.CurrentStrings.get().getAlertSetupWizardTitle(),
|
||||
kst4contest.view.i18n.CurrentStrings.get().getAlertSetupWizardQuestion(),
|
||||
kst4contest.view.i18n.CurrentStrings.get().getAlertSetupWizardBody(),
|
||||
kst4contest.view.i18n.CurrentStrings.get().getDialogStartSetupWizard(),
|
||||
kst4contest.view.i18n.CurrentStrings.get().getDialogCancel(),
|
||||
chatcontroller.getChatPreferences().isGUI_darkModeActive());
|
||||
|
||||
if (confirmed) {
|
||||
ApplicationRuntimeLauncher.rerunSetupWizard();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Windows -> open or close the cluster / stranger-QSO monitor window. */
|
||||
void menuActionToggleMonitorWindow() {
|
||||
if (MonitorWindow.isOpen()) {
|
||||
|
||||
@@ -55,6 +55,9 @@ interface MainMenuActions {
|
||||
fun setQrgAsNameInChat()
|
||||
fun toggleAwayState()
|
||||
fun toggleSettingsWindow()
|
||||
|
||||
/** Ends the session after asking and runs the setup wizard for the active profile. */
|
||||
fun openSetupWizard()
|
||||
fun toggleMonitorWindow()
|
||||
fun toggleStationMap()
|
||||
fun useDarkDesign()
|
||||
|
||||
@@ -87,6 +87,11 @@ fun mainMenuModel(
|
||||
enabled = true,
|
||||
actions::toggleSettingsWindow,
|
||||
),
|
||||
/*
|
||||
* Always usable, like the profile switch: it rebuilds the runtime and asks before
|
||||
* it gives the session up.
|
||||
*/
|
||||
MenuEntry.Item(strings.menuSetupWizard, state.canSwitchProfile, actions::openSetupWizard),
|
||||
),
|
||||
),
|
||||
MenuSpec(
|
||||
|
||||
Reference in new issue
Block a user