mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 10:41:06 +00:00
Changed Full path inside bundle is displayed as SWF name instead simple name
Fixed Storing SWF configuration for files inside bundles and/or binarydata
This commit is contained in:
@@ -654,7 +654,7 @@ public class FontPanel extends JPanel {
|
||||
SWF swf = f.getSwf();
|
||||
String selectedName = ((FontFace) fontFaceSelection.getSelectedItem()).font.getFontName(Locale.ENGLISH);
|
||||
swf.sourceFontNamesMap.put(f.getFontId(), selectedName);
|
||||
Configuration.addFontPair(swf.getShortFileName(), f.getFontId(), f.getFontNameIntag(), selectedName);
|
||||
Configuration.addFontPair(swf.getShortPathTitle(), f.getFontId(), f.getFontNameIntag(), selectedName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -862,6 +862,7 @@ public class Main {
|
||||
}
|
||||
result.bundle = bundle;
|
||||
result.name = new File(sourceInfo.getFileTitleOrName()).getName();
|
||||
final String fname = result.name;
|
||||
for (Entry<String, SeekableInputStream> streamEntry : bundle.getAll().entrySet()) {
|
||||
InputStream stream = streamEntry.getValue();
|
||||
stream.reset();
|
||||
@@ -869,7 +870,7 @@ public class Main {
|
||||
@Override
|
||||
public SWF doInBackground() throws Exception {
|
||||
final CancellableWorker worker = this;
|
||||
String fileKey = new File(streamEntry.getKey()).getName();
|
||||
String fileKey = fname + "/" + streamEntry.getKey();
|
||||
SwfSpecificCustomConfiguration conf = Configuration.getSwfSpecificCustomConfiguration(fileKey);
|
||||
|
||||
String charset = conf == null ? Charset.defaultCharset().name() : conf.getCustomData(SwfSpecificCustomConfiguration.KEY_CHARSET, Charset.defaultCharset().name());
|
||||
@@ -1347,13 +1348,13 @@ public class Main {
|
||||
}
|
||||
|
||||
if (mainFrame != null && fswf != null) {
|
||||
SwfSpecificConfiguration swfConf = Configuration.getSwfSpecificConfiguration(fswf.getShortFileName());
|
||||
SwfSpecificConfiguration swfConf = Configuration.getSwfSpecificConfiguration(fswf.getShortPathTitle());
|
||||
String resourcesPathStr = null;
|
||||
String tagListPathStr = null;
|
||||
if (swfConf != null) {
|
||||
resourcesPathStr = swfConf.lastSelectedPath;
|
||||
}
|
||||
SwfSpecificCustomConfiguration swfCustomConf = Configuration.getSwfSpecificCustomConfiguration(fswf.getShortFileName());
|
||||
SwfSpecificCustomConfiguration swfCustomConf = Configuration.getSwfSpecificCustomConfiguration(fswf.getShortPathTitle());
|
||||
if (swfCustomConf != null) {
|
||||
resourcesPathStr = swfCustomConf.getCustomData(SwfSpecificCustomConfiguration.KEY_LAST_SELECTED_PATH_RESOURCES, resourcesPathStr);
|
||||
tagListPathStr = swfCustomConf.getCustomData(SwfSpecificCustomConfiguration.KEY_LAST_SELECTED_PATH_TAGLIST, null);
|
||||
|
||||
@@ -225,6 +225,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -1674,7 +1675,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
|
||||
String selFile2;
|
||||
if (usedSwfs.size() > 1) {
|
||||
selFile2 = selFile + File.separator + Helper.getNextId(swf.getShortFileName(), usedSwfsIds);
|
||||
selFile2 = selFile + File.separator + Helper.getNextId(swf.getTitleOrShortFileName(), usedSwfsIds);
|
||||
} else {
|
||||
selFile2 = selFile;
|
||||
}
|
||||
@@ -4187,14 +4188,17 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
protected Void doInBackground() throws Exception {
|
||||
try {
|
||||
for (DefineBinaryDataTag binaryDataTag : binaryDataTags) {
|
||||
String path = binaryDataTag.getSwf().getShortPathTitle()+"/DefineBinaryData (" + binaryDataTag.getCharacterId() + ")";
|
||||
try {
|
||||
SwfSpecificCustomConfiguration conf = Configuration.getSwfSpecificCustomConfiguration(path);
|
||||
String charset = conf == null ? Charset.defaultCharset().name() : conf.getCustomData(SwfSpecificCustomConfiguration.KEY_CHARSET, Charset.defaultCharset().name());
|
||||
InputStream is = new ByteArrayInputStream(binaryDataTag.binaryData.getRangeData());
|
||||
SWF bswf = new SWF(is, null, "(SWF Data)", new ProgressListener() {
|
||||
@Override
|
||||
public void progress(int p) {
|
||||
Main.loadingDialog.setPercent(p);
|
||||
}
|
||||
}, Configuration.parallelSpeedUp.get());
|
||||
}, Configuration.parallelSpeedUp.get(), charset);
|
||||
binaryDataTag.innerSwf = bswf;
|
||||
bswf.binaryData = binaryDataTag;
|
||||
} catch (IOException ex) {
|
||||
@@ -4424,7 +4428,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
}
|
||||
|
||||
if (swf != null) {
|
||||
SwfSpecificCustomConfiguration swfCustomConf = Configuration.getOrCreateSwfSpecificCustomConfiguration(swf.getShortFileName());
|
||||
SwfSpecificCustomConfiguration swfCustomConf = Configuration.getOrCreateSwfSpecificCustomConfiguration(swf.getShortPathTitle());
|
||||
//swfConf.lastSelectedPath = tagTree.getSelectionPathString();
|
||||
swfCustomConf.setCustomData(SwfSpecificCustomConfiguration.KEY_LAST_SELECTED_PATH_RESOURCES, tagTree.getSelectionPathString());
|
||||
swfCustomConf.setCustomData(SwfSpecificCustomConfiguration.KEY_LAST_SELECTED_PATH_TAGLIST, tagListTree.getSelectionPathString());
|
||||
|
||||
@@ -3040,7 +3040,7 @@ public class TagTreeContextMenu extends JPopupMenu {
|
||||
return;
|
||||
}
|
||||
|
||||
SwfSpecificCustomConfiguration conf = Configuration.getOrCreateSwfSpecificCustomConfiguration(item.getShortFileName());
|
||||
SwfSpecificCustomConfiguration conf = Configuration.getOrCreateSwfSpecificCustomConfiguration(item.getShortPathTitle());
|
||||
conf.setCustomData(SwfSpecificCustomConfiguration.KEY_CHARSET, newCharset);
|
||||
while (item.binaryData != null) {
|
||||
item = item.binaryData.getSwf();
|
||||
|
||||
Reference in New Issue
Block a user