From 9b9c0f0594209b8c4ecdb7901293734ccf567437 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 9 May 2024 18:09:24 +0300 Subject: Finished implementing all the settings, mapping menu, trident list menu, and fixed all the bugs/issues. Added more index actions for a total of 10 actions (compared to the original 4). Updated README.md and TODO.md. Changed version to 2.0.0. Versions now follow the semver standard. which means that for each major version there will be backwards incompatible changes. for minor versions there will be new features and bug fixes. and for patch versions there will be bug fixes only. --- .../kotlin/me/kyren223/trident/ui/SettingsConfigurable.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/kotlin/me/kyren223/trident/ui/SettingsConfigurable.kt') diff --git a/src/main/kotlin/me/kyren223/trident/ui/SettingsConfigurable.kt b/src/main/kotlin/me/kyren223/trident/ui/SettingsConfigurable.kt index 6283a29..79c4fdc 100644 --- a/src/main/kotlin/me/kyren223/trident/ui/SettingsConfigurable.kt +++ b/src/main/kotlin/me/kyren223/trident/ui/SettingsConfigurable.kt @@ -4,7 +4,7 @@ package me.kyren223.trident.ui import com.intellij.openapi.options.Configurable import com.intellij.openapi.util.NlsContexts.ConfigurableName import me.kyren223.trident.data.SettingsData -import me.kyren223.trident.data.SettingsState +import me.kyren223.trident.data.Settings import javax.swing.JComponent class SettingsConfigurable : Configurable { @@ -21,7 +21,7 @@ class SettingsConfigurable : Configurable { } override fun isModified(): Boolean { - val settings = SettingsState.instance + val settings = Settings.state if (settings.width != this.settings!!.getWidth()) return true if (settings.height != this.settings!!.getHeight()) return true if (settings.fontSize != this.settings!!.getFontSize()) return true @@ -29,11 +29,12 @@ class SettingsConfigurable : Configurable { if (settings.automaticMapping != this.settings!!.getAutomaticMapping()) return true if (settings.recursiveMapping != this.settings!!.getRecursiveMapping()) return true if (settings.rememberLine != this.settings!!.getRememberLine()) return true + if (settings.indexCycling != this.settings!!.getIndexCycling()) return true return false } override fun apply() { - val settings = SettingsState.instance + val settings = Settings.state settings.width = this.settings!!.getWidth() settings.height = this.settings!!.getHeight() settings.fontSize = this.settings!!.getFontSize() @@ -41,10 +42,11 @@ class SettingsConfigurable : Configurable { settings.automaticMapping = this.settings!!.getAutomaticMapping() settings.recursiveMapping = this.settings!!.getRecursiveMapping() settings.rememberLine = this.settings!!.getRememberLine() + settings.indexCycling = this.settings!!.getIndexCycling() } override fun reset() { - val settings = SettingsState.instance + val settings = Settings.state if (this.settings == null) { this.settings = SettingsData() } @@ -55,6 +57,7 @@ class SettingsConfigurable : Configurable { this.settings!!.setAutomaticMapping(settings.automaticMapping) this.settings!!.setRecursiveMapping(settings.recursiveMapping) this.settings!!.setRememberLine(settings.rememberLine) + this.settings!!.setIndexCycling(settings.indexCycling) } override fun disposeUIResources() { -- cgit v1.3.1