mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-06 13:56:34 +02:00
Build a better about dialog
This commit is contained in:
@@ -1127,21 +1127,29 @@ public final class MainWindow implements Runnable, RipStatusHandler {
|
|||||||
trayMenuAbout.addActionListener(arg0 -> {
|
trayMenuAbout.addActionListener(arg0 -> {
|
||||||
StringBuilder about = new StringBuilder();
|
StringBuilder about = new StringBuilder();
|
||||||
|
|
||||||
about.append("<html><h1>").append(mainFrame.getTitle()).append("</h1>");
|
|
||||||
about.append("Download albums from various websites:");
|
|
||||||
try {
|
try {
|
||||||
List<String> rippers = Utils.getListOfAlbumRippers();
|
List<String> rippers = Utils.getListOfAlbumRippers();
|
||||||
about.append("<ul>");
|
|
||||||
|
JTextArea aboutTextArea = new JTextArea();
|
||||||
|
aboutTextArea.setEditable(false);
|
||||||
|
aboutTextArea.setLineWrap(true);
|
||||||
|
aboutTextArea.setWrapStyleWord(true);
|
||||||
|
|
||||||
|
JScrollPane scrollPane = new JScrollPane(aboutTextArea);
|
||||||
|
scrollPane.setPreferredSize(new Dimension(400, 300));
|
||||||
|
|
||||||
|
StringBuilder aboutContent = new StringBuilder();
|
||||||
|
aboutContent.append("Download albums from various websites:\n");
|
||||||
for (String ripper : rippers) {
|
for (String ripper : rippers) {
|
||||||
about.append("<li>");
|
|
||||||
ripper = ripper.substring(ripper.lastIndexOf('.') + 1);
|
ripper = ripper.substring(ripper.lastIndexOf('.') + 1);
|
||||||
if (ripper.contains("Ripper")) {
|
if (ripper.contains("Ripper")) {
|
||||||
ripper = ripper.substring(0, ripper.indexOf("Ripper"));
|
ripper = ripper.substring(0, ripper.indexOf("Ripper"));
|
||||||
}
|
}
|
||||||
about.append(ripper);
|
aboutContent.append("- ").append(ripper).append("\n");
|
||||||
about.append("</li>");
|
|
||||||
}
|
}
|
||||||
about.append("</ul>");
|
|
||||||
|
aboutTextArea.setText(aboutContent.toString());
|
||||||
|
JOptionPane.showMessageDialog(null, scrollPane, "Supported Rippers", JOptionPane.INFORMATION_MESSAGE);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.warn(e.getMessage());
|
LOGGER.warn(e.getMessage());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user