From cdfb0cf538af395a0305aa9fba89cd4ba562d2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 23 Aug 2014 20:30:26 +0200 Subject: [PATCH] deobfuscation type switch ribbon fixed --- .../decompiler/flash/gui/MainFrameRibbonMenu.java | 10 ++++++++-- .../decompiler/flash/gui/locales/MainFrame.properties | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java b/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java index 91c579664..e91442171 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java +++ b/src/com/jpexs/decompiler/flash/gui/MainFrameRibbonMenu.java @@ -278,6 +278,12 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener { return mainMenu; } + private List getEmptyResizePolicies(JRibbonBand ribbonBand) { + List resizePolicies = new ArrayList<>(); + resizePolicies.add(new CoreRibbonResizePolicies.Mirror(ribbonBand.getControlPanel())); + return resizePolicies; + } + private List getResizePolicies(JRibbonBand ribbonBand) { List resizePolicies = new ArrayList<>(); resizePolicies.add(new CoreRibbonResizePolicies.Mirror(ribbonBand.getControlPanel())); @@ -501,8 +507,8 @@ public class MainFrameRibbonMenu implements MainFrameMenu, ActionListener { assignListener(clearRecentFilesCommandButton, ACTION_CLEAR_RECENT_FILES); advancedSettingsBand.addCommandButton(clearRecentFilesCommandButton, RibbonElementPriority.MEDIUM); - JRibbonBand deobfuscationBand = new JRibbonBand(translate("menu.deobfuscation"), null); - deobfuscationBand.setResizePolicies(getResizePolicies(deobfuscationBand)); + JRibbonBand deobfuscationBand = new JRibbonBand(translate("menu.deobfuscation"), null); + deobfuscationBand.setResizePolicies(getEmptyResizePolicies(deobfuscationBand)); //TODO: add icons and change this to getResizePolicies CommandToggleButtonGroup grpDeobfuscation = new CommandToggleButtonGroup(); diff --git a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties index 1462de8a2..a6638de19 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties @@ -514,7 +514,7 @@ contextmenu.parseActions = Parse actions contextmenu.parseABC = Parse ABC contextmenu.parseInstructions = Parse AVM2 Instrctions -menu.deobfuscation = Debofuscation +menu.deobfuscation = Deobfuscation menu.file.deobfuscation.disabled = Disabled -menu.file.deobfuscation.old = Olddddddddddd +menu.file.deobfuscation.old = Old menu.file.deobfuscation.new = New