diff --git a/CHANGELOG.md b/CHANGELOG.md index 31d79c81a..7c52dbab1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,7 @@ All notable changes to this project will be documented in this file. - #1311 actionScript source font size - #1312 faster colliding usages finder - #1303 garbled text when exporting frame with text +- #1314 user interface: button order ## [9.0.0] - 2016-08-12 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java index 4172e6543..00b1cc676 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/SWF.java @@ -2916,8 +2916,7 @@ public final class SWF implements SWFContainerItem, Timelined { timelined.setModified(true); timelined.resetTimeline(); } else // timeline should be always the swf here - { - if (removeDependencies) { + if (removeDependencies) { removeTagWithDependenciesFromTimeline(tag, timelined.getTimeline()); timelined.setModified(true); } else { @@ -2926,7 +2925,6 @@ public final class SWF implements SWFContainerItem, Timelined { timelined.setModified(true); } } - } } @Override diff --git a/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java b/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java index 720590e2f..8817125e5 100644 --- a/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/AdvancedSettingsDialog.java @@ -187,8 +187,8 @@ public class AdvancedSettingsDialog extends AppDialog { buttonsPanel.add(buttonsLeftPanel, BorderLayout.WEST); JPanel buttonsRightPanel = new JPanel(new FlowLayout()); - buttonsRightPanel.add(cancelButton); buttonsRightPanel.add(okButton); + buttonsRightPanel.add(cancelButton); buttonsPanel.add(buttonsRightPanel, BorderLayout.EAST); cnt.add(buttonsPanel, BorderLayout.SOUTH); @@ -197,13 +197,11 @@ public class AdvancedSettingsDialog extends AppDialog { JComboBox skinComboBox = new JComboBox<>(); skinComboBox.setRenderer(new SubstanceDefaultListCellRenderer() { - @Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { SubstanceDefaultListCellRenderer cmp = (SubstanceDefaultListCellRenderer) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); //To change body of generated methods, choose Tools | Templates. final SkinSelect ss = (SkinSelect) value; cmp.setIcon(new Icon() { - @Override public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2 = (Graphics2D) g; @@ -241,7 +239,6 @@ public class AdvancedSettingsDialog extends AppDialog { }); return cmp; } - }); skinComboBox.addItem(new SkinSelect(OceanicSkin.NAME, OceanicSkin.class.getName())); Map skins = SubstanceLookAndFeel.getAllSkins(); diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 54b8fc920..50becf504 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -1701,16 +1701,19 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se boolean ignoreCase = searchDialog.ignoreCaseCheckBox.isSelected(); boolean regexp = searchDialog.regexpCheckBox.isSelected(); - if (searchDialog.searchInASRadioButton.isSelected()) { + boolean scriptSearch = searchDialog.searchInASRadioButton.isSelected() + || searchDialog.searchInPCodeRadioButton.isSelected(); + if (scriptSearch) { + boolean pCodeSearch = searchDialog.searchInPCodeRadioButton.isSelected(); new CancellableWorker() { @Override protected Void doInBackground() throws Exception { List abcResult = null; List actionResult = null; if (swf.isAS3()) { - abcResult = getABCPanel().search(swf, txt, ignoreCase, regexp, this); + abcResult = getABCPanel().search(swf, txt, ignoreCase, regexp, pCodeSearch, this); } else { - actionResult = getActionPanel().search(swf, txt, ignoreCase, regexp, this); + actionResult = getActionPanel().search(swf, txt, ignoreCase, regexp, pCodeSearch, this); } List fAbcResult = abcResult; diff --git a/src/com/jpexs/decompiler/flash/gui/SearchDialog.java b/src/com/jpexs/decompiler/flash/gui/SearchDialog.java index 2d3962731..ac054e406 100644 --- a/src/com/jpexs/decompiler/flash/gui/SearchDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/SearchDialog.java @@ -55,6 +55,8 @@ public class SearchDialog extends AppDialog { public JRadioButton searchInASRadioButton = new JRadioButton(translate("checkbox.searchAS")); + public JRadioButton searchInPCodeRadioButton = new JRadioButton(translate("checkbox.searchPCode")); + public JRadioButton searchInTextsRadioButton = new JRadioButton(translate("checkbox.searchText")); private int result = ERROR_OPTION; @@ -99,12 +101,15 @@ public class SearchDialog extends AppDialog { if (!replace) { ButtonGroup group = new ButtonGroup(); group.add(searchInASRadioButton); + group.add(searchInPCodeRadioButton); group.add(searchInTextsRadioButton); JPanel rbPanel = new JPanel(new FlowLayout()); searchInASRadioButton.setSelected(true); + searchInPCodeRadioButton.setSelected(false); searchInTextsRadioButton.setSelected(false); rbPanel.add(searchInASRadioButton); + // todo: honfika rbPanel.add(searchInPCodeRadioButton); rbPanel.add(searchInTextsRadioButton); cnt.add(rbPanel); } diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 101fa699b..4c66bfa51 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -137,6 +137,7 @@ import jsyntaxpane.TokenType; public class ABCPanel extends JPanel implements ItemListener, SearchListener, TagEditorPanel { private As3ScriptReplacerInterface scriptReplacer = null; + private ScriptPack pack = null; private final MainPanel mainPanel; @@ -187,7 +188,8 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener search(final SWF swf, final String txt, boolean ignoreCase, boolean regexp, CancellableWorker worker) { + public List search(final SWF swf, final String txt, boolean ignoreCase, boolean regexp, boolean pcode, CancellableWorker worker) { + // todo: pcode seach List ignoredClasses = new ArrayList<>(); List ignoredNss = new ArrayList<>(); @@ -310,6 +312,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener path = new ArrayList<>(); public Variable var; + public Variable varInsideGetter; public Long parentObjectId; @@ -317,6 +320,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener childs; @@ -392,8 +396,8 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener 0) + //current var is getter function - set it to value really got + //if ((var.flags & VariableFlags.HAS_GETTER) > 0) { varInsideGetter = igv.parent; } @@ -506,10 +510,15 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener search(SWF swf, final String txt, boolean ignoreCase, boolean regexp, CancellableWorker worker) { + public List search(SWF swf, final String txt, boolean ignoreCase, boolean regexp, boolean pcode, CancellableWorker worker) { if (txt != null && !txt.isEmpty()) { searchPanel.setOptions(ignoreCase, regexp); Map asms = swf.getASMs(false); @@ -469,7 +469,6 @@ public class ActionPanel extends JPanel implements SearchListener