diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f966229c..b40e202a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added +- Information message before importing scripts, text, XML, Symbol-Class + ### Fixed - Japanese in english locales for Gotoaddress, addclass dialog - AS1/2 DefineFunction cleaner diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java index 138f6213d..ee896470a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/configuration/Configuration.java @@ -729,6 +729,22 @@ public final class Configuration { @ConfigurationCategory("limit") public static ConfigurationItem limitSameChars = null; + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("ui") + public static ConfigurationItem showImportScriptsInfo = null; + + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("ui") + public static ConfigurationItem showImportTextInfo = null; + + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("ui") + public static ConfigurationItem showImportSymbolClassInfo = null; + + @ConfigurationDefaultBoolean(true) + @ConfigurationCategory("ui") + public static ConfigurationItem showImportXmlInfo = null; + private enum OSId { WINDOWS, OSX, UNIX } diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index a786fcb6b..843a8a478 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -2407,6 +2407,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se } public void importText(final SWF swf) { + ViewMessages.showMessageDialog(MainPanel.this, translate("message.info.importTexts"), translate("message.info"), JOptionPane.INFORMATION_MESSAGE, Configuration.showImportTextInfo); JFileChooser chooser = new JFileChooser(); chooser.setCurrentDirectory(new File(Configuration.lastExportDir.get())); chooser.setDialogTitle(translate("import.select.directory")); @@ -2488,6 +2489,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se if (as3ScriptReplacer == null) { return; } + ViewMessages.showMessageDialog(MainPanel.this, translate("message.info.importScripts"), translate("message.info"), JOptionPane.INFORMATION_MESSAGE, Configuration.showImportScriptsInfo); + String flexLocation = Configuration.flexSdkLocation.get(); JFileChooser chooser = new JFileChooser(); chooser.setCurrentDirectory(new File(Configuration.lastExportDir.get())); @@ -2513,6 +2516,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se } public void importSymbolClass(final SWF swf) { + ViewMessages.showMessageDialog(MainPanel.this, translate("message.info.importSymbolClass").replace("%file%", SymbolClassExporter.SYMBOL_CLASS_EXPORT_FILENAME), translate("message.info"), JOptionPane.INFORMATION_MESSAGE, Configuration.showImportSymbolClassInfo); + JFileChooser chooser = new JFileChooser(); chooser.setCurrentDirectory(new File(Configuration.lastExportDir.get())); chooser.setDialogTitle(translate("import.select.directory")); @@ -2646,6 +2651,9 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se public void importSwfXml() { View.checkAccess(); + ViewMessages.showMessageDialog(MainPanel.this, translate("message.info.importXml"), translate("message.info"), JOptionPane.INFORMATION_MESSAGE, Configuration.showImportXmlInfo); + + List sel = tagTree.getSelected(); Set swfs = new HashSet<>(); for (TreeItem item : sel) { diff --git a/src/com/jpexs/decompiler/flash/gui/ViewMessages.java b/src/com/jpexs/decompiler/flash/gui/ViewMessages.java index fb8132710..303b2d330 100644 --- a/src/com/jpexs/decompiler/flash/gui/ViewMessages.java +++ b/src/com/jpexs/decompiler/flash/gui/ViewMessages.java @@ -97,7 +97,7 @@ public class ViewMessages { return; } - JLabel warLabel = new JLabel("" + message.replace("\r\n", "
") + ""); + JLabel warLabel = new JLabel("
" + message.replace("\r\n", "
") + "
"); final JPanel warPanel = new JPanel(new BorderLayout()); warPanel.add(warLabel, BorderLayout.CENTER); donotShowAgainCheckBox = new JCheckBox(AppStrings.translate("message.confirm.donotshowagain")); diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties index ae6c864f5..60e12e9a0 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog.properties @@ -543,3 +543,15 @@ config.description.showDialogOnError = Automatically displays error dialog on ev config.name.limitSameChars = Limit of the same characters for \\{xx}C (repeat) escape config.description.limitSameChars = Maximum number of the same characters in a row in P-code strings or obufuscated names before replacing with \\{xx}C repeat escape + +config.name.showImportScriptsInfo = Show information before importing scripts +config.description.showImportScriptsInfo = Displays some info about how importing scripts works after clicking Import scripts in the menu. + +config.name.showImportTextInfo = Show information before importing text +config.description.showImportTextInfo = Displays some info about how importing text works after clicking Import text in the menu. + +config.name.showImportSymbolClassInfo = Show information before importing Symbol-Class +config.description.showImportSymbolClassInfo = Displays some info about how Symbol-Class importing works after clicking Import Symbol-Class in the menu. + +config.name.showImportXmlInfo = Show information before importing XML +config.description.showImportXmlInfo = Displays some info about how XML importing works after clicking Import XML in the menu. diff --git a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties index dacaa09b9..3fdd1c3ff 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/AdvancedSettingsDialog_cs.properties @@ -535,3 +535,15 @@ config.description.showDialogOnError = Automaticky zobaz\u00ed chybov\u00fd dial config.name.limitSameChars = Limit stejn\u00fdch znak\u016f pro \\{xx}C (opakovac\u00ed) escape sekvenci config.description.limitSameChars = Maxim\u00e1ln\u00ed po\u010det stejn\u00fdch znak\u016f za sebou v P-code \u0159et\u011bzc\u00edch \u010di obfuskovan\u00fdch jm\u00e9nech p\u0159ed nahrazen\u00edm \\{xx}C opakovac\u00ed sekvenc\u00ed + +config.name.showImportScriptsInfo = Zobrazit informaci p\u0159ed importem skript\u016f +config.description.showImportScriptsInfo = Zobraz\u00ed n\u011bjak\u00e9 informace o tom jak import skript\u016f funguje po kliku na import skript\u016f v menu. + +config.name.showImportTextInfo = Zobrazit informaci p\u0159ed importem textu +config.description.showImportTextInfo = Zobraz\u00ed n\u011bjak\u00e9 informace o tom jak import text\u016f funguje po kliku na import skript\u016f v menu. + +config.name.showImportSymbolClassInfo = Zobrazit informaci p\u0159ed importem Symbol-Class +config.description.showImportSymbolClassInfo = Zobraz\u00ed n\u011bjak\u00e9 informace o tom jak import Symbol-Class funguje po kliku na import Symbol-Class v menu. + +config.name.showImportXmlInfo = Zobrazit informaci p\u0159ed importem XML +config.description.showImportXmlInfo = Zobraz\u00ed n\u011bjak\u00e9 informace o tom jak import XML funguje po kliku na import XML v menu. diff --git a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties index 0c26a39d4..239a9bc61 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame.properties @@ -827,4 +827,21 @@ notavailable.activex.disable = You can enable using internal viewer by uncheckin Advanced Settings / Other / (Deprecated) Use Adobe Flash player for preview of objects\n \ But unfortunately, this won't work for movie tags. -button.showin.flashprojector = Show in flash projector \ No newline at end of file +button.showin.flashprojector = Show in flash projector + +message.info = Information + +message.info.importScripts = During importing scripts, you need to select a FOLDER.\r\n \ + The folder must contain "scripts" subfolder and its tree must match existing script tree in current selected SWF.\r\n \ + The best way to get the structure right is to export scripts in current SWF file first. \r\n\r\n \ + Also note that this import uses same EXPERIMENTAL compiler as in standard AS editation in FFDec window. + +message.info.importTexts = During importing text, you need to select a FOLDER.\r\n \ + The folder must contain "texts" subfolder and filenames inside must match existing texts in current selected SWF.\r\n \ + The best way to get the structure right is to export texts in current SWF file first. + +message.info.importSymbolClass = During importing Symbol-Class, you need to select a FOLDER containing file "%file%".\r\n \ + This is the same filename as it is used when exported. + +message.info.importXml = For XML importing, you need a XML file in special format - the format in which FFDec exports.\r\n \ + The best way to create such XML file is to export XML from existing SWF first. \ No newline at end of file diff --git a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties index bcea586ea..5c2e98635 100644 --- a/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties +++ b/src/com/jpexs/decompiler/flash/gui/locales/MainFrame_cs.properties @@ -803,4 +803,21 @@ notavailable.activex.disable = M\u016f\u017eete povolit pou\u017eit\u00ed intern Pokro\u010dil\u00e1 nastaven\u00ed / Ostatn\u00ed / (P\u0159ekon\u00e1no) Pou\u017e\u00edvat Adobe Flash player pro n\u00e1hledy objekt\u016f\n \ Ale bohu\u017eel, tohle nebude fungovat pro tagy s videi. -button.showin.flashprojector = Zobrazit ve flash projektoru \ No newline at end of file +button.showin.flashprojector = Zobrazit ve flash projektoru + +message.info = Informace + +message.info.importScripts = B\u011bhem importu skript\u016f mus\u00edte vybrat SLO\u017dKU.\r\n \ + Slo\u017eka mus\u00ed obsahovat podslo\u017eku "scripts" a jej\u00ed strom mus\u00ed souhlasit s existuj\u00edc\u00edm stromem skript\u016f v pr\u00e1v\u011b vybran\u00e9m SWF.\r\n \ + Nejlep\u0161\u00ed zp\u016fsob jak m\u00edt tuto strukturu spr\u00e1vn\u011b je nejprve exportovat skripty v aktu\u00e1ln\u00edm SWF souboru. \r\n\r\n \ + Tak\u00e9 nezapome\u0148te, \u017ee tento import pou\u017e\u00edv\u00e1 stejn\u00fd EXPERIMENT\u00c1LN\u00cd kompil\u00e1tor jako p\u0159i standardn\u00ed AS editaci v okn\u011b FFDec. + +message.info.importTexts = B\u011bhem importu text\u016f mus\u00edte vybrat SLO\u017dKU.\r\n \ + Slo\u017eka mus\u00ed obsahovat podslo\u017eku "texts" a n\u00e1zvy soubor\u016f v n\u00ed mus\u00ed souhlasit s existuj\u00edc\u00edmi texty v pr\u00e1v\u011b vybran\u00e9m SWF.\r\n \ + Nejlep\u0161\u00ed zp\u016fsob jak m\u00edt tuto strukturu spr\u00e1vn\u011b je nejprve exportovat texty v aktu\u00e1ln\u00edm SWF souboru. + +message.info.importSymbolClass = B\u011bhem importu Symbol-Class mus\u00edte vybrat SLO\u017dKU obsahuj\u00edc\u00ed soubor "%file%".\r\n \ + To je stejn\u00fd n\u00e1zev jako se pou\u017e\u00edv\u00e1 p\u0159i exportu. + +message.info.importXml = Pro XML import je pot\u0159eba XML soubor ve speci\u00e1ln\u00edm form\u00e1tu - form\u00e1tu, ve kter\u00e9m FFDec exportuje.\r\n \ + Nejlep\u0161\u00ed zp\u016fsob jak vytvo\u0159it takov\u00e9 XML je exportovat XML z existuj\u00edc\u00edho SWF. \ No newline at end of file