The converter GUI can now be run standalone or from Jskad's Tools menu.
The converter GUI gives nicer error messages in at least one case.
This commit is contained in:
parent
7938648ca8
commit
b841a7f14b
3 changed files with 108 additions and 44 deletions
|
@ -418,10 +418,32 @@ public class Jskad extends JPanel implements DocumentListener {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
JMenuItem converterItem = new JMenuItem("Launch Converter...");
|
||||
converterItem.addActionListener(new ThdlActionListener() {
|
||||
public void theRealActionPerformed(ActionEvent e) {
|
||||
int rv = ConverterGUI.realMain(new String[] { },
|
||||
System.out,
|
||||
((parentObject instanceof Frame)
|
||||
? (Frame)parentObject
|
||||
: null));
|
||||
if (rv == 0) {
|
||||
JOptionPane.showMessageDialog(Jskad.this,
|
||||
"Converter closed normally.",
|
||||
"Converter Done", JOptionPane.PLAIN_MESSAGE);
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(Jskad.this,
|
||||
"Converter closed abnormally.",
|
||||
"Converter Error", JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
});
|
||||
toolsMenu.addSeparator();
|
||||
toolsMenu.add(toTMItem);
|
||||
toolsMenu.add(toTMWItem);
|
||||
toolsMenu.add(toUnicodeItem);
|
||||
toolsMenu.addSeparator();
|
||||
toolsMenu.add(converterItem);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue