Skip to content

Commit

Permalink
Merge pull request #57 from doki-theme/settingsFix
Browse files Browse the repository at this point in the history
Settings Menu fix
  • Loading branch information
Unthrottled authored Feb 23, 2023
2 parents d6848c1 + 5e18db7 commit 6d5d15d
Show file tree
Hide file tree
Showing 64 changed files with 220 additions and 301 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ scripts/
testAssets/

# Generated Directory
shared/src/main/resources/doki/generated
shared/src/main/resources/doki/icons
src/main/resources/doki/generated
src/main/resources/doki/icons

# macOS
.DS_Store
Expand Down
5 changes: 0 additions & 5 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## [Unreleased]

## 88.3-1.0.10 [Settings Menu Restoration]

### Fixed

- Settings menu not showing up.

## 88.3-1.0.9 [More Icons]

### Added
Expand Down
74 changes: 35 additions & 39 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,55 +30,50 @@ repositories {
}

dependencies {
implementation(project(":shared"))
runtimeOnly(project(":rider"))
implementation("org.javassist:javassist:3.29.2-GA")
implementation("commons-io:commons-io:2.11.0")
implementation("io.sentry:sentry:6.14.0")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("io.mockk:mockk:1.13.4")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
}

allprojects {
apply {
plugin("java")
plugin("org.jetbrains.kotlin.jvm")
plugin("org.jetbrains.intellij")
plugin("io.gitlab.arturbosch.detekt")
plugin("org.jlleitschuh.gradle.ktlint")
configurations {
implementation.configure {
// sentry brings in a slf4j that breaks when
// with the platform slf4j
exclude("org.slf4j")
}
}

dependencies {
implementation("org.javassist:javassist:3.29.2-GA")
testImplementation("org.assertj:assertj-core:3.24.2")
testImplementation("io.mockk:mockk:1.13.4")
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")
}
repositories {
mavenCentral()
}

repositories {
mavenCentral()
}

// Set the JVM language level used to compile sources and generate files - Java 11 is required since 2020.3
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
// Set the JVM language level used to compile sources and generate files - Java 11 is required since 2020.3
kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

// Configure detekt plugin.
// Read more: https://detekt.github.io/detekt/kotlindsl.html
detekt {
config = files("./detekt-config.yml")
buildUponDefaultConfig = true
autoCorrect = true

reports {
html.enabled = false
xml.enabled = false
txt.enabled = false
}
detekt {
config = files("./detekt-config.yml")
buildUponDefaultConfig = true
autoCorrect = true

reports {
html.enabled = false
xml.enabled = false
txt.enabled = false
}
}

tasks {
buildSearchableOptions {
enabled = false
}
tasks {
buildSearchableOptions {
enabled = false
}
}

Expand All @@ -89,7 +84,8 @@ intellij {
type.set(properties("platformType"))

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
val activePlugins: MutableList<Any> = properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty).toMutableList()
val activePlugins: MutableList<Any> =
properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty).toMutableList()

// activePlugins.add(
// project(":doki-theme")
Expand Down
1 change: 0 additions & 1 deletion buildSrc/src/main/kotlin/BuildThemes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ open class BuildThemes : DefaultTask() {

private fun getResourcesDirectory(): Path = get(
project.rootDir.absolutePath,
"shared",
"src",
"main",
"resources"
Expand Down
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pluginGroup = io.unthrottled.doki.icons
pluginName = Doki Theme Icons
pluginVersion = 88.3-1.0.9
pluginVersion = 88.3-1.0.10

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 222
Expand All @@ -11,7 +11,6 @@ pluginUntilBuild = 231.*
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension
platformType = IU
platformVersion = 2022.3.2
riderVersion=RD-2022.1

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
Expand Down
34 changes: 0 additions & 34 deletions rider/build.gradle.kts

This file was deleted.

1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
rootProject.name = "doki-theme-icons-jetbrains"
include("shared", "rider")

// include(":doki-theme")
// project(":doki-theme").projectDir = file("../doki-theme-jetbrains")
41 changes: 0 additions & 41 deletions shared/build.gradle.kts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="io.unthrottled.doki.icons.jetbrains.shared.settings.IconSettingsUI">
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="io.unthrottled.doki.icons.jetbrains.settings.IconSettingsUI">
<grid id="27dc6" binding="rootPane" layout-manager="GridLayoutManager" row-count="6" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.unthrottled.doki.icons.jetbrains.shared.settings;
package io.unthrottled.doki.icons.jetbrains.settings;

import com.intellij.ide.BrowserUtil;
import com.intellij.openapi.application.ApplicationManager;
Expand All @@ -8,14 +8,14 @@
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.util.NlsContexts;
import com.intellij.ui.components.ActionLink;
import icons.DokiThemeIcons;
import io.unthrottled.doki.icons.jetbrains.shared.Constants;
import io.unthrottled.doki.icons.jetbrains.shared.config.Config;
import io.unthrottled.doki.icons.jetbrains.shared.config.IconConfigListener;
import io.unthrottled.doki.icons.jetbrains.shared.config.IconSettings;
import io.unthrottled.doki.icons.jetbrains.shared.config.IconSettingsModel;
import io.unthrottled.doki.icons.jetbrains.shared.integrations.PluginService;
import io.unthrottled.doki.icons.jetbrains.shared.tools.PluginMessageBundle;
import icons.DokiThemeIconz;
import io.unthrottled.doki.icons.jetbrains.Constants;
import io.unthrottled.doki.icons.jetbrains.config.Config;
import io.unthrottled.doki.icons.jetbrains.config.IconConfigListener;
import io.unthrottled.doki.icons.jetbrains.config.IconSettings;
import io.unthrottled.doki.icons.jetbrains.config.IconSettingsModel;
import io.unthrottled.doki.icons.jetbrains.integrations.PluginService;
import io.unthrottled.doki.icons.jetbrains.tools.PluginMessageBundle;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand Down Expand Up @@ -68,19 +68,19 @@ private void initializeAutoCreatedComponents() {
UIIconsCheckBox.setSelected(initialIconSettingsModel.isUIIcons());
UIIconsCheckBox.addActionListener(e ->
iconSettingsModel.setUIIcons(UIIconsCheckBox.isSelected()));
uiIcon.setIcon(DokiThemeIcons.PROJECT_GLYPH);
uiIcon.setIcon(DokiThemeIconz.PROJECT_GLYPH);

filesCheckBox.setSelected(initialIconSettingsModel.isNamedFileIcons());
filesCheckBox.addActionListener(e ->
iconSettingsModel.setNamedFileIcons(filesCheckBox.isSelected()));
namedFilesIcon.setIcon(DokiThemeIcons.CURLY_BRACES);
namedFilesIcon.setIcon(DokiThemeIconz.CURLY_BRACES);
namedFilesIcon.setVisible(false);
filesCheckBox.setVisible(false);

PSICheckBox.setSelected(initialIconSettingsModel.isGlyphIcons());
PSICheckBox.addActionListener(e ->
iconSettingsModel.setGlyphIcons(PSICheckBox.isSelected()));
fileGlyphs.setIcon(DokiThemeIcons.SOLID_DOKI_GLYPH);
fileGlyphs.setIcon(DokiThemeIconz.SOLID_DOKI_GLYPH);

foldersCheckBox.setSelected(initialIconSettingsModel.isNamedFolderIcons());
foldersCheckBox.addActionListener(e ->
Expand All @@ -91,7 +91,7 @@ private void initializeAutoCreatedComponents() {
myIconsCheckBox.setSelected(initialIconSettingsModel.isMyIcons());
myIconsCheckBox.addActionListener(e ->
iconSettingsModel.setMyIcons(myIconsCheckBox.isSelected()));
myIconsIcon.setIcon(DokiThemeIcons.MAMSNRHBR_CHEHFDE);
myIconsIcon.setIcon(DokiThemeIconz.MAMSNRHBR_CHEHFDE);

boolean dokiThemeInstalled = PluginService.INSTANCE.isDokiThemeInstalled();
syncWithDokiThemeCheckBox.setEnabled(dokiThemeInstalled);
Expand All @@ -106,13 +106,13 @@ private void initializeAutoCreatedComponents() {
initialIconSettingsModel.getSyncWithDokiTheme())
);

iconRequest.setIcon(DokiThemeIcons.WATCH);
iconRequest.setIcon(DokiThemeIconz.WATCH);
iconRequest.setText(PluginMessageBundle.message("settings.icon.request"));
iconRequest.addActionListener(e -> {
BrowserUtil.browse(Constants.REPO_URL + "/issues/new?assignees=Unthrottled&labels=enhancement&template=ICON_REQUEST.yml&title=%5BICON%5D%3A+");
});

reportIssue.setIcon(DokiThemeIcons.SOLID_ERROR);
reportIssue.setIcon(DokiThemeIconz.SOLID_ERROR);
reportIssue.setText(PluginMessageBundle.message("settings.report.bug"));
reportIssue.addActionListener(e -> {
BrowserUtil.browse(Constants.REPO_URL + "/issues/new?assignees=Unthrottled&labels=bug%2Ctriage&template=BUG_REPORT.yml&title=[Bug]%3A+");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import com.intellij.openapi.util.IconLoader
import com.intellij.ui.IconManager.getInstance
import javax.swing.Icon

object DokiThemeIcons {
object DokiThemeIconz {
@JvmField
val PLUGIN_ICON = IconLoader.getIcon("/doki/icons/doki_icon_logo.svg", javaClass)

Expand Down Expand Up @@ -36,5 +36,5 @@ object DokiThemeIcons {
}

private fun load(path: String): Icon =
getInstance().getIcon(path, DokiThemeIcons::class.java)
getInstance().getIcon(path, DokiThemeIconz::class.java)
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.unthrottled.doki.icons.jetbrains.shared
package io.unthrottled.doki.icons.jetbrains

object Constants {
const val REPO_URL = "https://github.com/doki-theme/doki-theme-icons-jetbrains"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.unthrottled.doki.icons.jetbrains.shared
package io.unthrottled.doki.icons.jetbrains

import com.intellij.ide.plugins.PluginManagerCore
import com.intellij.openapi.extensions.PluginId
import io.unthrottled.doki.icons.jetbrains.shared.tools.toOptional
import io.unthrottled.doki.icons.jetbrains.tools.toOptional
import java.util.Optional

object DokiThemeIcons {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.unthrottled.doki.icons.jetbrains.shared
package io.unthrottled.doki.icons.jetbrains

data class DokiThemeInformation(
val id: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package io.unthrottled.doki.icons.jetbrains.shared
package io.unthrottled.doki.icons.jetbrains

import com.intellij.openapi.Disposable
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.project.Project
import com.intellij.openapi.project.ProjectManager
import com.intellij.openapi.project.ProjectManagerListener
import io.unthrottled.doki.icons.jetbrains.shared.laf.LAFIconReplacementComponent
import io.unthrottled.doki.icons.jetbrains.shared.onboarding.UserOnBoarding
import io.unthrottled.doki.icons.jetbrains.shared.path.ExperimentalUIBastardizer
import io.unthrottled.doki.icons.jetbrains.shared.path.IconPathReplacementComponent
import io.unthrottled.doki.icons.jetbrains.shared.svg.ThemedSVGManager
import io.unthrottled.doki.icons.jetbrains.shared.themes.IconThemeManager
import io.unthrottled.doki.icons.jetbrains.shared.tools.Logging
import io.unthrottled.doki.icons.jetbrains.laf.LAFIconReplacementComponent
import io.unthrottled.doki.icons.jetbrains.onboarding.UserOnBoarding
import io.unthrottled.doki.icons.jetbrains.path.ExperimentalUIBastardizer
import io.unthrottled.doki.icons.jetbrains.path.IconPathReplacementComponent
import io.unthrottled.doki.icons.jetbrains.svg.ThemedSVGManager
import io.unthrottled.doki.icons.jetbrains.themes.IconThemeManager
import io.unthrottled.doki.icons.jetbrains.tools.Logging
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.ConcurrentMap

Expand Down
Loading

0 comments on commit 6d5d15d

Please sign in to comment.