mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-16 15:12:16 +00:00
Fixed: #1670 Parent component/window of dialogs not properly set
This commit is contained in:
@@ -58,6 +58,7 @@ import com.jpexs.decompiler.flash.gui.SearchListener;
|
||||
import com.jpexs.decompiler.flash.gui.SearchPanel;
|
||||
import com.jpexs.decompiler.flash.gui.TagEditorPanel;
|
||||
import com.jpexs.decompiler.flash.gui.View;
|
||||
import com.jpexs.decompiler.flash.gui.ViewMessages;
|
||||
import com.jpexs.decompiler.flash.gui.abc.tablemodels.DecimalTableModel;
|
||||
import com.jpexs.decompiler.flash.gui.abc.tablemodels.DoubleTableModel;
|
||||
import com.jpexs.decompiler.flash.gui.abc.tablemodels.IntTableModel;
|
||||
@@ -1439,7 +1440,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
return;
|
||||
}
|
||||
|
||||
if (View.showConfirmDialog(null, AppStrings.translate("message.confirm.experimental.function"), AppStrings.translate("message.warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, Configuration.warningExperimentalAS3Edit, JOptionPane.OK_OPTION) == JOptionPane.OK_OPTION) {
|
||||
if (ViewMessages.showConfirmDialog(this, AppStrings.translate("message.confirm.experimental.function"), AppStrings.translate("message.warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, Configuration.warningExperimentalAS3Edit, JOptionPane.OK_OPTION) == JOptionPane.OK_OPTION) {
|
||||
pack = decompiledTextArea.getScriptLeaf();
|
||||
setDecompiledEditMode(true);
|
||||
SwingWorker initReplaceWorker = new SwingWorker() {
|
||||
@@ -1477,7 +1478,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
}
|
||||
|
||||
reload();
|
||||
View.showMessageDialog(this, AppStrings.translate("message.action.saved"), AppStrings.translate("dialog.message.title"), JOptionPane.INFORMATION_MESSAGE, Configuration.showCodeSavedMessage);
|
||||
ViewMessages.showMessageDialog(this, AppStrings.translate("message.action.saved"), AppStrings.translate("dialog.message.title"), JOptionPane.INFORMATION_MESSAGE, Configuration.showCodeSavedMessage);
|
||||
} catch (As3ScriptReplaceException asre) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int firstErrorLine = As3ScriptReplaceExceptionItem.LINE_UNKNOWN;
|
||||
@@ -1508,9 +1509,9 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
}
|
||||
|
||||
if (scriptReplacer instanceof FFDecAs3ScriptReplacer) { //oldStyle error display - single error, no column
|
||||
View.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", firstErrorText).replace("%line%", Long.toString(firstErrorLine)), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
ViewMessages.showMessageDialog(this, AppStrings.translate("error.action.save").replace("%error%", firstErrorText).replace("%line%", Long.toString(firstErrorLine)), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
} else {
|
||||
View.showMessageDialog(this, sb.toString(), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
ViewMessages.showMessageDialog(this, sb.toString(), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
decompiledTextArea.requestFocus();
|
||||
|
||||
@@ -1570,7 +1571,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
return;
|
||||
}
|
||||
|
||||
if (View.showConfirmDialog(null, AppStrings.translate("message.confirm.removetrait"), AppStrings.translate("message.warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.OK_OPTION) {
|
||||
if (ViewMessages.showConfirmDialog(this, AppStrings.translate("message.confirm.removetrait"), AppStrings.translate("message.warning"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.OK_OPTION) {
|
||||
|
||||
if (scriptTraitsUsed) {
|
||||
final int fTraitIndex = traitIndex;
|
||||
@@ -1598,7 +1599,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
return;
|
||||
}
|
||||
if (newTraitDialog == null) {
|
||||
newTraitDialog = new NewTraitDialog();
|
||||
newTraitDialog = new NewTraitDialog(Main.getDefaultDialogsOwner());
|
||||
}
|
||||
int void_type = abc.constants.getPublicQnameId("void", true);//abc.constants.forceGetMultinameId(new Multiname(Multiname.QNAME, abc.constants.forceGetStringId("void"), abc.constants.forceGetNamespaceId(new Namespace(Namespace.KIND_PACKAGE, abc.constants.forceGetStringId("")), 0), -1, -1, new ArrayList<Integer>()));
|
||||
int int_type = abc.constants.getPublicQnameId("int", true); //abc.constants.forceGetMultinameId(new Multiname(Multiname.QNAME, abc.constants.forceGetStringId("int"), abc.constants.forceGetNamespaceId(new Namespace(Namespace.KIND_PACKAGE, abc.constants.forceGetStringId("")), 0), -1, -1, new ArrayList<Integer>()));
|
||||
@@ -1614,7 +1615,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
|
||||
loopm:
|
||||
do {
|
||||
if (again) {
|
||||
View.showMessageDialog(null, AppStrings.translate("error.trait.exists").replace("%name%", name), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
ViewMessages.showMessageDialog(this, AppStrings.translate("error.trait.exists").replace("%name%", name), AppStrings.translate("error"), JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
again = false;
|
||||
if (newTraitDialog.showDialog() != AppDialog.OK_OPTION) {
|
||||
|
||||
Reference in New Issue
Block a user