small fixes

This commit is contained in:
2014-12-01 00:13:48 +01:00
parent 9125a5abd4
commit 77b8ef808a
10 changed files with 31 additions and 22 deletions
@@ -2195,9 +2195,9 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
try {
get();
} catch (CancellationException ex) {
getABCPanel().decompiledTextArea.setText("//" + AppStrings.translate("work.canceled"));
getABCPanel().decompiledTextArea.setText("// " + AppStrings.translate("work.canceled"));
} catch (Exception ex) {
getABCPanel().decompiledTextArea.setText("//" + AppStrings.translate("decompilationError") + ": " + ex);
getABCPanel().decompiledTextArea.setText("// " + AppStrings.translate("decompilationError") + ": " + ex);
}
}
});
@@ -640,7 +640,7 @@ public class DecompiledEditorPane extends LineMarkedEditorPane implements CaretL
this.script = scriptLeaf;
return;
}
setText("//" + AppStrings.translate("pleasewait") + "...");
setText("// " + AppStrings.translate("pleasewait") + "...");
this.abc = abc;
this.abcList = abcList;
@@ -357,6 +357,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
if (((newpercent > percent) || (!this.phase.equals(phase))) && newpercent <= 100) {
percent = newpercent;
this.phase = phase;
// todo: honfika: it is very slow to show every percent
setEditorText("; " + AppStrings.translate("work.disassembling") + " - " + phase + " " + percent + "%...", "text/flasm");
}
}
@@ -394,7 +395,10 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
protected Void doInBackground() throws Exception {
setEditorText("; " + AppStrings.translate("work.disassembling") + "...", "text/flasm");
if (Configuration.decompile.get()) {
setDecompiledText("//" + AppStrings.translate("work.waitingfordissasembly") + "...");
setDecompiledText("// " + AppStrings.translate("work.waitingfordissasembly") + "...");
} else {
lastDecompiled = Helper.getDecompilationSkippedComment();
setDecompiledText(lastDecompiled);
}
DisassemblyListener listener = getDisassemblyListener();
asm.addDisassemblyListener(listener);
@@ -406,7 +410,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
srcHexOnly = null;
setHex(getExportMode());
if (Configuration.decompile.get()) {
setDecompiledText("//" + AppStrings.translate("work.decompiling") + "...");
setDecompiledText("// " + AppStrings.translate("work.decompiling") + "...");
if (!useCache) {
SWF.uncache(asm);
}
@@ -435,7 +439,7 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene
} catch (CancellationException ex) {
setEditorText("; " + AppStrings.translate("work.canceled"), "text/flasm");
} catch (Exception ex) {
setDecompiledText("//" + AppStrings.translate("decompilationError") + ": " + ex);
setDecompiledText("// " + AppStrings.translate("decompilationError") + ": " + ex);
}
}
});
@@ -92,11 +92,11 @@ public class TagTreeModel implements TreeModel {
return AppStrings.translate(key);
}
private List<TreeItem> getSoundStreams(DefineSpriteTag sprite) {
List<TreeItem> ret = new ArrayList<>();
private List<SoundStreamHeadTypeTag> getSoundStreams(DefineSpriteTag sprite) {
List<SoundStreamHeadTypeTag> ret = new ArrayList<>();
for (Tag t : sprite.subTags) {
if (t instanceof SoundStreamHeadTypeTag) {
ret.add(t);
ret.add((SoundStreamHeadTypeTag) t);
}
}
return ret;