mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-20 19:15:33 +00:00
Added FLA export - remember last selected FLA version/compression
This commit is contained in:
@@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
|
||||
- Show "Renaming identifiers" status on file opening with auto rename identifiers on
|
||||
- [#2010] word wrapping in the translation tool
|
||||
- ABC Explorer tool
|
||||
- FLA export - remember last selected FLA version/compression
|
||||
|
||||
### Fixed
|
||||
- [#2043] StartSound2 tag handling
|
||||
|
||||
@@ -918,6 +918,12 @@ public final class Configuration {
|
||||
@ConfigurationCategory("export")
|
||||
public static ConfigurationItem<Boolean> lastExportEnableEmbed = null;
|
||||
|
||||
@ConfigurationDefaultString("CS6")
|
||||
public static ConfigurationItem<String> lastFlaExportVersion = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(true)
|
||||
public static ConfigurationItem<Boolean> lastFlaExportCompressed = null;
|
||||
|
||||
private enum OSId {
|
||||
WINDOWS, OSX, UNIX
|
||||
}
|
||||
|
||||
@@ -3159,6 +3159,12 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
List<FileFilter> xflFilters = new ArrayList<>();
|
||||
List<FLAVersion> versions = new ArrayList<>();
|
||||
boolean isAS3 = swf.isAS3();
|
||||
Map<FileFilter, String> filterToVersion = new HashMap<>();
|
||||
Map<FileFilter, Boolean> filterToCompressed = new HashMap<>();
|
||||
|
||||
FLAVersion lastVersion = FLAVersion.fromString(Configuration.lastFlaExportVersion.get("CS6"));
|
||||
boolean lastCompressed = Configuration.lastFlaExportCompressed.get(true);
|
||||
|
||||
for (int i = FLAVersion.values().length - 1; i >= 0; i--) {
|
||||
final FLAVersion v = FLAVersion.values()[i];
|
||||
if (!isAS3 && v.minASVersion() > 2) {
|
||||
@@ -3176,11 +3182,13 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
return translate("filter.fla").replace("%version%", v.applicationName());
|
||||
}
|
||||
};
|
||||
if (v == FLAVersion.CS6) {
|
||||
if (v == lastVersion && lastCompressed) {
|
||||
fc.setFileFilter(f);
|
||||
} else {
|
||||
fc.addChoosableFileFilter(f);
|
||||
}
|
||||
filterToVersion.put(f, "" + v);
|
||||
filterToCompressed.put(f, true);
|
||||
flaFilters.add(f);
|
||||
f = new FileFilter() {
|
||||
@Override
|
||||
@@ -3193,13 +3201,22 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
return translate("filter.xfl").replace("%version%", v.applicationName());
|
||||
}
|
||||
};
|
||||
fc.addChoosableFileFilter(f);
|
||||
filterToVersion.put(f, "" + v);
|
||||
filterToCompressed.put(f, false);
|
||||
|
||||
if (v == lastVersion && !lastCompressed) {
|
||||
fc.setFileFilter(f);
|
||||
} else {
|
||||
fc.addChoosableFileFilter(f);
|
||||
}
|
||||
xflFilters.add(f);
|
||||
}
|
||||
}
|
||||
|
||||
fc.setAcceptAllFileFilterUsed(false);
|
||||
if (fc.showSaveDialog(this) == JFileChooser.APPROVE_OPTION) {
|
||||
Configuration.lastFlaExportVersion.set(filterToVersion.get(fc.getFileFilter()));
|
||||
Configuration.lastFlaExportCompressed.set(filterToCompressed.get(fc.getFileFilter()));
|
||||
Configuration.lastOpenDir.set(Helper.fixDialogFile(fc.getSelectedFile()).getParentFile().getAbsolutePath());
|
||||
File sf = Helper.fixDialogFile(fc.getSelectedFile());
|
||||
|
||||
|
||||
@@ -699,3 +699,8 @@ config.description.warning.cannotencrypt = Show warning when cannot save SWF fil
|
||||
config.name.lastExportEnableEmbed = Last setting of export embedded assets
|
||||
config.description.lastExportEnableEmbed = Last setting of exporting embedded assets via [Embed] metadata.
|
||||
|
||||
config.name.lastFlaExportVersion = Last FLA export version
|
||||
config.description.lastFlaExportVersion = Last exported FLA version
|
||||
|
||||
config.name.lastFlaExportCompressed = Last FLA export compressed
|
||||
config.description.lastFlaExportCompressed = Last exported FLA version compressed
|
||||
|
||||
@@ -687,4 +687,10 @@ config.description.warning.cannotencrypt = Zobrazit varov\u00e1n\u00ed kdy\u017e
|
||||
|
||||
#after 18.5.0
|
||||
config.name.lastExportEnableEmbed = Posledn\u00ed nastaven\u00ed exportu vlo\u017een\u00fdch zdroj\u016f
|
||||
config.description.lastExportEnableEmbed = Posledn\u00ed nastaven\u00ed exportov\u00e1n\u00ed vlo\u017een\u00fdch zdroj\u016f skrze [Embed] metadata.
|
||||
config.description.lastExportEnableEmbed = Posledn\u00ed nastaven\u00ed exportov\u00e1n\u00ed vlo\u017een\u00fdch zdroj\u016f skrze [Embed] metadata.
|
||||
|
||||
config.name.lastFlaExportVersion = Posledn\u00ed verze FLA exportu
|
||||
config.description.lastFlaExportVersion = Posledn\u00ed exportovan\u00e1 verze FLA
|
||||
|
||||
config.name.lastFlaExportCompressed = Posledn\u00ed komprese FLA exportu
|
||||
config.description.lastFlaExportCompressed = Posledn\u00ed exportovan\u00e1 komprese FLA
|
||||
Reference in New Issue
Block a user