From be7e17665f5eb22b7d9d3affc23fc1cb3d9fdca5 Mon Sep 17 00:00:00 2001 From: octopus_yan Date: Thu, 19 Sep 2024 12:32:22 +0800 Subject: [PATCH] chore: clean up --- src/main/java/cn/octopusyan/alistgui/config/Context.java | 7 ------- src/main/java/cn/octopusyan/alistgui/util/FxmlUtil.java | 2 +- src/main/java/cn/octopusyan/alistgui/util/Registry.java | 2 -- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/main/java/cn/octopusyan/alistgui/config/Context.java b/src/main/java/cn/octopusyan/alistgui/config/Context.java index 0db021e..26f4319 100644 --- a/src/main/java/cn/octopusyan/alistgui/config/Context.java +++ b/src/main/java/cn/octopusyan/alistgui/config/Context.java @@ -150,12 +150,6 @@ public class Context { return LANGUAGE_RESOURCE_FACTORY.getResourceBundleProperty(); } - /** - * 初始化 语言 - */ - private static void initI18n() { - } - /** * 有此类所在路径决定相对路径 * @@ -183,7 +177,6 @@ public class Context { private static void loadScene() { try { FXMLLoader loader = FxmlUtil.load("root-view"); - loader.setControllerFactory(Context.getControlFactory()); //底层面板 Pane root = loader.load(); Optional.ofNullable(scene).ifPresentOrElse( diff --git a/src/main/java/cn/octopusyan/alistgui/util/FxmlUtil.java b/src/main/java/cn/octopusyan/alistgui/util/FxmlUtil.java index de5c07d..084dc3b 100644 --- a/src/main/java/cn/octopusyan/alistgui/util/FxmlUtil.java +++ b/src/main/java/cn/octopusyan/alistgui/util/FxmlUtil.java @@ -25,7 +25,7 @@ public class FxmlUtil { FxmlUtil.class.getResource(prefix + name + suffix), bundle, new JavaFXBuilderFactory(), - null, + Context.getControlFactory(), StandardCharsets.UTF_8 ); } diff --git a/src/main/java/cn/octopusyan/alistgui/util/Registry.java b/src/main/java/cn/octopusyan/alistgui/util/Registry.java index 33135ba..f370e9d 100644 --- a/src/main/java/cn/octopusyan/alistgui/util/Registry.java +++ b/src/main/java/cn/octopusyan/alistgui/util/Registry.java @@ -43,7 +43,6 @@ public class Registry { RESTORE, SAVE, UNLOAD, - ; } public enum Root { @@ -75,6 +74,5 @@ public class Registry { REG_LINK, REG_FULL_RESOURCE_DESCRIPTOR, REG_EXPAND_SZ, - ; } }