mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-31 19:54:37 +00:00
Making internal flash viewer a default viewer + move FP option switch to Advanced settings / others
This commit is contained in:
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Support for installing java in FFDec windows installer
|
||||
|
||||
### Changed
|
||||
- Making internal flash viewer a default viewer + move FP option switch to Advanced settings / others
|
||||
- Increased scrolling speed in folder preview
|
||||
- Changed /bin/bash to /usr/bin/env bash
|
||||
- Building does not require Naashorn - uses Beanshell instead
|
||||
|
||||
@@ -95,9 +95,14 @@ public final class Configuration {
|
||||
@ConfigurationCategory("")
|
||||
public static ConfigurationItem<Boolean> cacheImages = null;
|
||||
|
||||
/*
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("display")
|
||||
public static ConfigurationItem<Boolean> internalFlashViewer = null;
|
||||
*/
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationInternal
|
||||
public static ConfigurationItem<Boolean> useAdobeFlashPlayerForPreviews = null;
|
||||
|
||||
@ConfigurationDefaultInt(1000)
|
||||
@ConfigurationCategory("display")
|
||||
|
||||
@@ -99,10 +99,9 @@ public abstract class MainFrameMenu implements MenuBuilder {
|
||||
|
||||
protected final Map<String, ActionListener> menuActions = new HashMap<>();
|
||||
|
||||
public boolean isInternalFlashViewerSelected() {
|
||||
/*public boolean isInternalFlashViewerSelected() {
|
||||
return isMenuChecked("/settings/internalViewer"); //miInternalViewer.isSelected();
|
||||
}
|
||||
|
||||
}*/
|
||||
private final boolean externalFlashPlayerUnavailable;
|
||||
|
||||
public MainFrameMenu(MainFrame mainFrame, boolean externalFlashPlayerUnavailable) {
|
||||
@@ -648,14 +647,14 @@ public abstract class MainFrameMenu implements MenuBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
protected void internalViewerSwitchActionPerformed(ActionEvent evt) {
|
||||
/*protected void internalViewerSwitchActionPerformed(ActionEvent evt) {
|
||||
AbstractButton button = (AbstractButton) evt.getSource();
|
||||
boolean selected = button.isSelected();
|
||||
|
||||
Configuration.internalFlashViewer.set(selected);
|
||||
mainFrame.getPanel().reload(true);
|
||||
}
|
||||
|
||||
*/
|
||||
protected void simplifyExpressionsActionPerformed(ActionEvent evt) {
|
||||
AbstractButton button = (AbstractButton) evt.getSource();
|
||||
boolean selected = button.isSelected();
|
||||
@@ -935,7 +934,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
|
||||
|
||||
addToggleMenuItem("/settings/autoDeobfuscation", translate("menu.settings.autodeobfuscation"), null, null, this::autoDeobfuscationActionPerformed, 0, null);
|
||||
addToggleMenuItem("/settings/simplifyExpressions", translate("menu.settings.simplifyExpressions"), null, null, this::simplifyExpressionsActionPerformed, 0, null);
|
||||
addToggleMenuItem("/settings/internalViewer", translate("menu.settings.internalflashviewer"), null, null, this::internalViewerSwitchActionPerformed, 0, null);
|
||||
//addToggleMenuItem("/settings/internalViewer", translate("menu.settings.internalflashviewer"), null, null, this::internalViewerSwitchActionPerformed, 0, null);
|
||||
addToggleMenuItem("/settings/parallelSpeedUp", translate("menu.settings.parallelspeedup"), null, null, this::parallelSpeedUpActionPerformed, 0, null);
|
||||
addToggleMenuItem("/settings/disableDecompilation", translate("menu.settings.disabledecompilation"), null, null, this::disableDecompilationActionPerformed, 0, null);
|
||||
//addToggleMenuItem("/settings/cacheOnDisk", translate("menu.settings.cacheOnDisk"), null, null, this::cacheOnDiskActionPerformed, 0, null);
|
||||
@@ -976,11 +975,11 @@ public abstract class MainFrameMenu implements MenuBuilder {
|
||||
setMenuChecked("/settings/simplifyExpressions", newValue);
|
||||
});
|
||||
|
||||
setMenuChecked("/settings/internalViewer", Configuration.internalFlashViewer.get() || externalFlashPlayerUnavailable);
|
||||
/*setMenuChecked("/settings/internalViewer", Configuration.internalFlashViewer.get() || externalFlashPlayerUnavailable);
|
||||
Configuration.internalFlashViewer.addListener(configListenerInternalFlashViewer = (Boolean newValue) -> {
|
||||
setMenuChecked("/settings/internalViewer", newValue || externalFlashPlayerUnavailable);
|
||||
});
|
||||
|
||||
*/
|
||||
setMenuChecked("/settings/parallelSpeedUp", Configuration.parallelSpeedUp.get());
|
||||
Configuration.parallelSpeedUp.addListener(configListenerParallelSpeedUp = (Boolean newValue) -> {
|
||||
setMenuChecked("/settings/parallelSpeedUp", newValue);
|
||||
@@ -1178,7 +1177,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
|
||||
|
||||
Configuration.autoDeobfuscate.removeListener(configListenerAutoDeobfuscate);
|
||||
Configuration.simplifyExpressions.removeListener(configListenerSimplifyExpressions);
|
||||
Configuration.internalFlashViewer.removeListener(configListenerInternalFlashViewer);
|
||||
//Configuration.internalFlashViewer.removeListener(configListenerInternalFlashViewer);
|
||||
Configuration.parallelSpeedUp.removeListener(configListenerParallelSpeedUp);
|
||||
Configuration.decompile.removeListener(configListenerDecompile);
|
||||
//Configuration.cacheOnDisk.removeListener(configListenerCacheOnDisk);
|
||||
|
||||
@@ -3118,8 +3118,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isInternalFlashViewerSelected() {
|
||||
return mainMenu.isInternalFlashViewerSelected();
|
||||
public boolean isAdobeFlashPlayerEnabled() {
|
||||
return Configuration.useAdobeFlashPlayerForPreviews.get();
|
||||
}
|
||||
|
||||
public static final int VIEW_RESOURCES = 0;
|
||||
@@ -3302,7 +3302,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
previewPanel.showEmpty();
|
||||
return;
|
||||
}
|
||||
boolean internalViewer = isInternalFlashViewerSelected();
|
||||
boolean internalViewer = !isAdobeFlashPlayerEnabled();
|
||||
if (treeItem instanceof SWF) {
|
||||
SWF swf = (SWF) treeItem;
|
||||
if (internalViewer) {
|
||||
@@ -3422,7 +3422,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
|
||||
previewPanel.setImageReplaceButtonVisible(false, false);
|
||||
|
||||
boolean internalViewer = isInternalFlashViewerSelected();
|
||||
boolean internalViewer = !isAdobeFlashPlayerEnabled();
|
||||
|
||||
if (treeItem instanceof ScriptPack) {
|
||||
final ScriptPack scriptLeaf = (ScriptPack) treeItem;
|
||||
|
||||
@@ -467,7 +467,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
}
|
||||
|
||||
private void showFontPage(FontTag fontTag) {
|
||||
if (mainPanel.isInternalFlashViewerSelected() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
if (!mainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
showImagePanel(MainPanel.makeTimelined(fontTag), fontTag.getSwf(), fontPageNum);
|
||||
}
|
||||
}
|
||||
@@ -485,7 +485,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
}
|
||||
|
||||
public void showTextPanel(TextTag textTag) {
|
||||
if (mainPanel.isInternalFlashViewerSelected() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
if (!mainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
showImagePanel(MainPanel.makeTimelined(textTag), textTag.getSwf(), 0);
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
swf.saveTo(fos, false);
|
||||
}
|
||||
//Inject Loader
|
||||
if (swf.isAS3() && Configuration.autoOpenLoadedSWFs.get() && !Configuration.internalFlashViewer.get() && !DebuggerTools.hasDebugger(swf)) {
|
||||
if (swf.isAS3() && Configuration.autoOpenLoadedSWFs.get() && Configuration.useAdobeFlashPlayerForPreviews.get() && !DebuggerTools.hasDebugger(swf)) {
|
||||
SWF instrSWF;
|
||||
try (InputStream fis = new BufferedInputStream(new FileInputStream(tempFile))) {
|
||||
instrSWF = new SWF(fis, false, false);
|
||||
@@ -732,7 +732,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
FontTag fontTag = fontPanel.getFontTag();
|
||||
int pageCount = getFontPageCount(fontTag);
|
||||
fontPageNum = (fontPageNum + pageCount - 1) % pageCount;
|
||||
if (mainPanel.isInternalFlashViewerSelected() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
if (!mainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
imagePanel.setTimelined(MainPanel.makeTimelined(fontTag, fontPageNum), fontTag.getSwf(), 0);
|
||||
}
|
||||
}
|
||||
@@ -741,7 +741,7 @@ public class PreviewPanel extends JPersistentSplitPane implements TagEditorPanel
|
||||
FontTag fontTag = fontPanel.getFontTag();
|
||||
int pageCount = getFontPageCount(fontTag);
|
||||
fontPageNum = (fontPageNum + 1) % pageCount;
|
||||
if (mainPanel.isInternalFlashViewerSelected() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
if (!mainPanel.isAdobeFlashPlayerEnabled() /*|| ft instanceof GFxDefineCompactedFont*/) {
|
||||
imagePanel.setTimelined(MainPanel.makeTimelined(fontTag, fontPageNum), fontTag.getSwf(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,4 +475,7 @@ config.name.gui.avm2.splitPane.docs.dividerLocationPercent = (Internal) splitPan
|
||||
config.description.gui.avm2.splitPane.docs.dividerLocationPercent = splitPane docs divider Location Percent
|
||||
|
||||
config.name.gui.dump.splitPane.dividerLocationPercent = (Internal) dumpsplitPanedividerLocationPercent
|
||||
config.description.gui.dump.splitPane.dividerLocationPercent = dump splitPane divider Location Percent
|
||||
config.description.gui.dump.splitPane.dividerLocationPercent = dump splitPane divider Location Percent
|
||||
|
||||
config.name.useAdobeFlashPlayerForPreviews = (Deprecated) Use Adobe Flash player for preview of objects
|
||||
config.description.useAdobeFlashPlayerForPreviews = Use Adobe Flash player for preview of objects. WARNING: FlashPlayer was discontinued on 2021-01-12
|
||||
|
||||
Reference in New Issue
Block a user