From 0f72a605a312dc0c844d2aeca95c412553a09f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Thu, 28 Sep 2023 18:16:54 +0200 Subject: [PATCH] Changed #1355 Import panel moved to separate tab --- CHANGELOG.md | 2 + .../decompiler/flash/gui/MainFrameMenu.java | 41 +++++++++++-------- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3a22d4d7..ef93694b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,7 @@ Major version of SWF to XML export changed to 2. - AS3 Compound scripts (scripts containing multiple external definitions like compiled C code, etc.) cannot be directly edited or imported (due to problems with script initializers) - [#2022] - AS3 - Make script initializer always visible and available instead of config +- [#1355] Import panel moved to separate tab ## [18.5.0] - 2023-06-25 ### Added @@ -3117,6 +3118,7 @@ Major version of SWF to XML export changed to 2. [#2086]: https://www.free-decompiler.com/flash/issues/2086 [#2009]: https://www.free-decompiler.com/flash/issues/2009 [#2022]: https://www.free-decompiler.com/flash/issues/2022 +[#1355]: https://www.free-decompiler.com/flash/issues/1355 [#1998]: https://www.free-decompiler.com/flash/issues/1998 [#2038]: https://www.free-decompiler.com/flash/issues/2038 [#2028]: https://www.free-decompiler.com/flash/issues/2028 diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java index bdb8aa76d..aee28470c 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameMenu.java @@ -1015,11 +1015,16 @@ public abstract class MainFrameMenu implements MenuBuilder { setMenuEnabled("/file/export/exportSelected", openableSelected && !isWorking); setMenuEnabled("/file/export/exportXml", swfSelected && !isWorking); - setMenuEnabled("/file/import", openableSelected); - setMenuEnabled("/file/import/importText", allSameSwf && swfSelected && !isWorking); - setMenuEnabled("/file/import/importScript", allSameOpenable && openableSelected && !isWorking); - setMenuEnabled("/file/import/importOther", allSameSwf && swfSelected && !isWorking); - setMenuEnabled("/file/import/importXml", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab", openableSelected); + setMenuEnabled("/import/importtab/importText", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab/importScript", allSameOpenable && openableSelected && !isWorking); + setMenuEnabled("/import/importtab/importImages", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab/importShapes", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab/importShapesNoFill", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab/importMovies", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab/importSounds", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab/importSymbolClass", allSameSwf && swfSelected && !isWorking); + setMenuEnabled("/import/importtab/importXml", allSameSwf && swfSelected && !isWorking); setMenuEnabled("/tools/deobfuscation", openableSelected); setMenuEnabled("/tools/deobfuscation/renameOneIdentifier", swfSelected && !isWorking); @@ -1138,19 +1143,19 @@ public abstract class MainFrameMenu implements MenuBuilder { addMenuItem("/file/export/exportSelected", translate("menu.file.export.selection"), "exportsel16", this::exportSelectedActionPerformed, PRIORITY_MEDIUM, null, true, null, false); finishMenu("/file/export"); - addMenuItem("/file/import", translate("menu.import"), null, null, 0, null, false, null, false); - addMenuItem("/file/import/importXml", translate("menu.file.import.xml"), "importxml32", this::importXmlActionPerformed, PRIORITY_TOP, null, true, null, false); - addMenuItem("/file/import/importText", translate("menu.file.import.text"), "importtext32", this::importTextActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - addMenuItem("/file/import/importScript", translate("menu.file.import.script"), "importscript32", this::importScriptActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - addMenuItem("/file/import/importOther", translate("menu.file.import.other"), "importother32", null, PRIORITY_MEDIUM, null, false, null, false); - addMenuItem("/file/import/importOther/importImages", translate("menu.file.import.image"), "importimage32", this::importImagesActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - addMenuItem("/file/import/importOther/importShapes", translate("menu.file.import.shape"), "importshape32", this::importShapesActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - addMenuItem("/file/import/importOther/importShapesNoFill", translate("menu.file.import.shapeNoFill"), "importshape32", this::importShapesNoFillActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - addMenuItem("/file/import/importOther/importMovies", translate("menu.file.import.movie"), "importmovie32", this::importMoviesActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - addMenuItem("/file/import/importOther/importSounds", translate("menu.file.import.sound"), "importsound32", this::importSoundsActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - addMenuItem("/file/import/importOther/importSymbolClass", translate("menu.file.import.symbolClass"), "importsymbolclass32", this::importSymbolClassActionPerformed, PRIORITY_MEDIUM, null, true, null, false); - finishMenu("/file/import/importOther"); - finishMenu("/file/import"); + addMenuItem("/import", translate("menu.import"), null, null, 0, null, false, null, false); + addMenuItem("/import/importtab", translate("menu.import"), null, null, 0, null, false, null, false); + addMenuItem("/import/importtab/importXml", translate("menu.file.import.xml"), "importxml32", this::importXmlActionPerformed, PRIORITY_TOP, null, true, null, false); + addMenuItem("/import/importtab/importText", translate("menu.file.import.text"), "importtext32", this::importTextActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + addMenuItem("/import/importtab/importScript", translate("menu.file.import.script"), "importscript32", this::importScriptActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + addMenuItem("/import/importtab/importImages", translate("menu.file.import.image"), "importimage32", this::importImagesActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + addMenuItem("/import/importtab/importShapes", translate("menu.file.import.shape"), "importshape32", this::importShapesActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + addMenuItem("/import/importtab/importShapesNoFill", translate("menu.file.import.shapeNoFill"), "importshape32", this::importShapesNoFillActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + addMenuItem("/import/importtab/importMovies", translate("menu.file.import.movie"), "importmovie32", this::importMoviesActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + addMenuItem("/import/importtab/importSounds", translate("menu.file.import.sound"), "importsound32", this::importSoundsActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + addMenuItem("/import/importtab/importSymbolClass", translate("menu.file.import.symbolClass"), "importsymbolclass32", this::importSymbolClassActionPerformed, PRIORITY_MEDIUM, null, true, null, false); + finishMenu("/import/importtab"); + finishMenu("/import"); addMenuItem("/file/start", translate("menu.file.start"), null, null, 0, null, false, null, false); addMenuItem("/file/start/run", translate("menu.file.start.run"), "play32", this::runActionPerformed, PRIORITY_TOP, null, true, new HotKey("F6"), false);