diff --git a/src/main/java/mpo/dayon/assistant/gui/Assistant.java b/src/main/java/mpo/dayon/assistant/gui/Assistant.java index 09ea8605..f442ccc1 100644 --- a/src/main/java/mpo/dayon/assistant/gui/Assistant.java +++ b/src/main/java/mpo/dayon/assistant/gui/Assistant.java @@ -140,7 +140,7 @@ private void initGui() { if (frame != null) { frame.setVisible(false); } - frame = new AssistantFrame(createAssistantActions(), counters, createLanguageSelection()); + frame = new AssistantFrame(createAssistantActions(), counters, createLanguageSelection(), compatibilityModeActive.get()); FatalErrorHandler.attachFrame(frame); frame.addListener(new ControlEngine(network)); frame.setVisible(true); @@ -644,6 +644,10 @@ private Action createToggleCompatibilityModeAction() { @Override public void actionPerformed(ActionEvent ev) { compatibilityModeActive.set(!compatibilityModeActive.get()); + if (compatibilityModeActive.get()) { + JOptionPane.showMessageDialog(frame, translate("compatibility.mode.info"), + translate("compatibility.mode.active"), JOptionPane.WARNING_MESSAGE); + } frame.repaint(); } }; diff --git a/src/main/java/mpo/dayon/assistant/gui/AssistantFrame.java b/src/main/java/mpo/dayon/assistant/gui/AssistantFrame.java index 6a9f64b4..5de3cf5f 100644 --- a/src/main/java/mpo/dayon/assistant/gui/AssistantFrame.java +++ b/src/main/java/mpo/dayon/assistant/gui/AssistantFrame.java @@ -46,6 +46,8 @@ class AssistantFrame extends BaseFrame { private final JToggleButton controlToggleButton; + private final JToggleButton compatibilityToggleButton; + private final JToggleButton windowsKeyToggleButton; private final JToggleButton ctrlKeyToggleButton; @@ -80,12 +82,13 @@ class AssistantFrame extends BaseFrame { private final JComboBox languageSelection; - AssistantFrame(AssistantActions actions, Set> counters, JComboBox languageSelection) { + AssistantFrame(AssistantActions actions, Set> counters, JComboBox languageSelection, boolean compatibilityModeActive) { RepeatingReleasedEventsFixer.install(); super.setFrameType(FrameType.ASSISTANT); this.actions = actions; this.startButton = createButton(actions.getStartAction()); this.stopButton = createButton(actions.getStopAction(), false); + this.compatibilityToggleButton = createToggleButton(actions.getToggleCompatibilityModeAction(), true, compatibilityModeActive); this.controlToggleButton = createToggleButton(createToggleControlMode()); this.fitToScreenToggleButton = createToggleButton(createToggleFixScreenAction()); this.keepAspectRatioToggleButton = createToggleButton(createToggleKeepAspectRatioAction(), false); @@ -227,7 +230,7 @@ private JTabbedPane createTabbedPane() { connectionPanel.add(stopButton); connectionPanel.add(createButton(actions.getTokenAction())); connectionPanel.add(createButton(actions.getIpAddressAction())); - connectionPanel.add(createToggleButton(actions.getToggleCompatibilityModeAction())); + connectionPanel.add(compatibilityToggleButton); JPanel sessionPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0)); sessionPanel.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 0)); diff --git a/src/main/java/mpo/dayon/common/gui/common/BaseFrame.java b/src/main/java/mpo/dayon/common/gui/common/BaseFrame.java index 4d6a9d87..5d0b7303 100644 --- a/src/main/java/mpo/dayon/common/gui/common/BaseFrame.java +++ b/src/main/java/mpo/dayon/common/gui/common/BaseFrame.java @@ -136,6 +136,12 @@ protected JToggleButton createToggleButton(Action action, boolean visible) { return button; } + protected JToggleButton createToggleButton(Action action, boolean visible, boolean selected) { + final JToggleButton button = createToggleButton(action, visible); + button.setSelected(selected); + return button; + } + private void addButtonProperties(Action action, AbstractButton button) { button.setMargin(ZERO_INSETS); button.setHideActionText(true); diff --git a/src/main/resources/Babylon.properties b/src/main/resources/Babylon.properties index 8daccdcc..9264a071 100644 --- a/src/main/resources/Babylon.properties +++ b/src/main/resources/Babylon.properties @@ -182,6 +182,8 @@ share.all.screens = Share all screens compatibility.mode = Compatibility mode for previous versions compatibility.mode.enable = Enable compatibility mode! +compatibility.mode.active = Compatibility mode active +compatibility.mode.info = Please consider updating Assisted to the latest version to minimize risks. changeLanguage = Change language startChat = Start a chat diff --git a/src/main/resources/Babylon_de.properties b/src/main/resources/Babylon_de.properties index c414479b..56034e34 100644 --- a/src/main/resources/Babylon_de.properties +++ b/src/main/resources/Babylon_de.properties @@ -181,6 +181,8 @@ share.all.screens = Alle Bildschirme teilen compatibility.mode = Kompatibilit\u00E4tsmodus f\u00FCr Vorg\u00E4ngerversionen compatibility.mode.enable = Kompatibilit\u00E4tsmodus aktivieren! +compatibility.mode.active = Kompatibilit\u00E4tsmodus aktiv +compatibility.mode.info = Um Sicherheitsrisiken zu minimieren, aktualisieren Sie doch biite den Assistierten auf die neueste Version. changeLanguage = Sprache \u00E4ndern startChat = Chat starten \ No newline at end of file diff --git a/src/main/resources/Babylon_es.properties b/src/main/resources/Babylon_es.properties index a3c3d936..8284c5a2 100644 --- a/src/main/resources/Babylon_es.properties +++ b/src/main/resources/Babylon_es.properties @@ -181,6 +181,8 @@ share.all.screens = Compartir todas las pantallas compatibility.mode = Modo de compatibilidad para versiones anteriores compatibility.mode.enable = \u00A1Habilite el modo de compatibilidad! +compatibility.mode.active = Modo de compatibilidad activo +compatibility.mode.info = Por favor, considere actualizar Assisted a la \u00FAltima versi\u00F3n para minimizar los riesgos. changeLanguage = Cambiar el idioma startChat = Iniciar un chat \ No newline at end of file diff --git a/src/main/resources/Babylon_fr.properties b/src/main/resources/Babylon_fr.properties index b063c6f4..82184132 100644 --- a/src/main/resources/Babylon_fr.properties +++ b/src/main/resources/Babylon_fr.properties @@ -181,6 +181,8 @@ share.all.screens = Partager tous les \u00E9crans compatibility.mode = Mode de compatibilit\u00E9 pour les versions pr\u00E9c\u00E9dentes compatibility.mode.enable = Activez le mode compatibilit\u00E9! +compatibility.mode.active = Mode de compatibilit\u00E9 actif +compatibility.mode.info = Veuillez consid\u00E9rer la mise \u00E0 jour de l'assist\u00E9 vers la derni\u00E8re version afin de minimiser les risques. changeLanguage = Changer la langue startChat = Commencer un chat \ No newline at end of file diff --git a/src/main/resources/Babylon_it.properties b/src/main/resources/Babylon_it.properties index dc8ce5be..e489a1d7 100644 --- a/src/main/resources/Babylon_it.properties +++ b/src/main/resources/Babylon_it.properties @@ -181,6 +181,8 @@ share.all.screens = Condividi tutti gli schermi compatibility.mode = Modalit\u00E0 di compatibilit\u00E0 per le versioni precedenti compatibility.mode.enable = Abilita la modalit\u00E0 compatibilit\u00E0! +compatibility.mode.active = Modalit\u00E0 di compatibilit\u00E0 attiva +compatibility.mode.info = Si consiglia di aggiornare assistito alla versione pi\u00F9 recente per ridurre al minimo i rischi. changeLanguage = Cambiare la lingua startChat = Iniziare una chat \ No newline at end of file diff --git a/src/main/resources/Babylon_ru.properties b/src/main/resources/Babylon_ru.properties index 02e4ee1e..f50fab3f 100644 --- a/src/main/resources/Babylon_ru.properties +++ b/src/main/resources/Babylon_ru.properties @@ -181,6 +181,8 @@ share.all.screens = \u0414\u0435\u043B\u0438\u0442\u0435\u0441\u044C \u0432\u044 compatibility.mode = \u0420\u0435\u0436\u0438\u043C \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u043E\u0441\u0442\u0438 \u0441 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u043C\u0438 \u0432\u0435\u0440\u0441\u0438\u044F\u043C\u0438 compatibility.mode.enable = \u0412\u043A\u043B\u044E\u0447\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043C \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u043E\u0441\u0442\u0438! +compatibility.mode.active = \u0420\u0435\u0436\u0438\u043C \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u043E\u0441\u0442\u0438 \u0430\u043A\u0442\u0438\u0432\u0435\u043D +compatibility.mode.info = \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043E\u0431\u043D\u043E\u0432\u0438\u0442\u0435 \u041F\u043E\u043C\u043E\u0433\u0430\u043B \u0434\u043E \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438, \u0447\u0442\u043E\u0431\u044B \u043C\u0438\u043D\u0438\u043C\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0440\u0438\u0441\u043A\u0438. changeLanguage = \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u044F\u0437\u044B\u043A startChat = \u043D\u0430\u0447\u0430\u0442\u044C \u0447\u0430\u0442 \ No newline at end of file diff --git a/src/main/resources/Babylon_sv.properties b/src/main/resources/Babylon_sv.properties index 12b30fd3..b2f100ee 100644 --- a/src/main/resources/Babylon_sv.properties +++ b/src/main/resources/Babylon_sv.properties @@ -181,6 +181,8 @@ share.all.screens = Dela alla sk\u00E4rmar compatibility.mode = Kompatibelt l\u00E4ge f\u00F6r tidigare versioner compatibility.mode.enable = Aktivera kompatibilitetsl\u00E4ge! +compatibility.mode.active = Kompatibelt l\u00E4ge aktivt +compatibility.mode.info = V\u00E4nligen \u00F6verv\u00E4ga att uppdatera Hj\u00E4lptagare till den senaste versionen f\u00F6r att minimera riskerna. changeLanguage = V\u00E4xla spr\u00E5kl\u00E4ge startChat = Starta en chatt \ No newline at end of file diff --git a/src/main/resources/Babylon_tr.properties b/src/main/resources/Babylon_tr.properties index c697a764..3644f386 100644 --- a/src/main/resources/Babylon_tr.properties +++ b/src/main/resources/Babylon_tr.properties @@ -181,6 +181,8 @@ share.all.screens = T\u00FCm ekranlar\u0131 payla\u015F compatibility.mode = \u00D6nceki s\u00FCr\u00FCmler i\u00E7in uyumluluk modu compatibility.mode.enable = Uyumluluk modunu etkinle\u015Ftirin! +compatibility.mode.active = Uyumluluk modu etkin +compatibility.mode.info = Riskleri en aza indirmek i\u00E7in l\u00FCtfen yard\u0131ml\u0131 en son s\u00FCr\u00FCme g\u00FCncellemeyi d\u00FC\u015F\u00FCn\u00FCn. changeLanguage = Dili de\u011Fi\u015Ftir startChat = Sohbet ba\u015Flat \ No newline at end of file diff --git a/src/main/resources/Babylon_zh.properties b/src/main/resources/Babylon_zh.properties index f707e0a4..eef8bbf5 100644 --- a/src/main/resources/Babylon_zh.properties +++ b/src/main/resources/Babylon_zh.properties @@ -282,6 +282,8 @@ share.all.screens = \u5171\u4EAB\u6240\u6709\u5C4F\u5E55 compatibility.mode = \u4EE5\u524D\u7248\u672C\u7684\u517C\u5BB9\u6A21\u5F0F compatibility.mode.enable = \u542F\u7528\u517C\u5BB9\u6A21\u5F0F\uFF01 +compatibility.mode.active = \u517C\u5BB9\u6A21\u5F0F\u5DF2\u6FC0\u6D3B +compatibility.mode.info = \u8BF7\u8003\u8651\u5C06\u60A8\u7684\u540C\u884C\u7CFB\u7EDF\u5347\u7EA7\u5230\u6700\u65B0\u7248\u672C\uFF0C\u4EE5\u6700\u5927\u9650\u5EA6\u5730\u964D\u4F4E\u98CE\u9669\u3002 changeLanguage = \u6539\u53D8\u8BED\u8A00 startChat = \u5F00\u59CB\u804A\u5929 \ No newline at end of file