Skip to content

Commit

Permalink
Add about menu
Browse files Browse the repository at this point in the history
  • Loading branch information
krlvm committed May 13, 2020
1 parent 590097b commit bbe66c8
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ Available arguments:
* [dnsjava](https://github.com/dnsjava/dnsjava) - DNS library, DoH realization
* [dnssecjava](https://github.com/ibauersachs/dnssecjava) - DNSSec realization for dnsjava
* [DNSSEC4J](https://github.com/adamfisk/DNSSEC4J) - DNSSec realization for LittleProxy
* [Java Native Access](https://github.com/java-native-access/jna) - changing the system's proxy server using the native APIs
* [SwingDPI](https://github.com/krlvm/SwingDPI) - HiDPI scaling
* [Java Native Access](https://github.com/java-native-access/jna) - library for accessing system API
* [SwingDPI](https://github.com/krlvm/SwingDPI) - High DPI scaling
17 changes: 15 additions & 2 deletions src/ru/krlvm/powertunnel/frames/AdvancedMainFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,21 @@ public void actionPerformed(ActionEvent e) {
about.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
PowerTunnel.optionsFrame.showFrame();
JEditorPane message = UIUtility.getLabelWithHyperlinkSupport(
"<a href=\"https://github.com/krlvm/PowerTunnel\">PowerTunnel</a> is made possible by these open-source projects:" +
"<br><br>" +
"<a href=\"https://github.com/adamfisk/LittleProxy\">LittleProxy</a> - proxy server<br>" +
"<a href=\"https://github.com/dnsjava/dnsjava\">dnsjava</a> - DNS library, DoH realization<br>" +
"<a href=\"https://github.com/ibauersachs/dnssecjava\">dnssecjava</a> - DNSSec realization for dnsjava<br>" +
"<a href=\"https://github.com/adamfisk/DNSSEC4J\">DNSSEC4J</a> - DNSSec realization for LittleProxy<br>" +
"<a href=\"https://github.com/java-native-access/jna\">Java Native Access</a> - library for accessing system API<br>" +
"<a href=\"https://github.com/krlvm/SwingDPI\">SwingDPI</a> - High DPI scaling" +
"<br><br>" +
"<a href=\"https:/t.me/powertunnel_dpi\">Join PowerTunnel Telegram channel!</a>" +
"<br><br>" +
"(c) krlvm, 2019-2020",
null);
JOptionPane.showMessageDialog(null, message, "About " + PowerTunnel.NAME, JOptionPane.INFORMATION_MESSAGE);
}
});

Expand All @@ -153,7 +167,6 @@ public void actionPerformed(ActionEvent e) {
pane.add(panel, gbc);
root.add(pane, BorderLayout.NORTH);

panel = new JPanel(new FlowLayout(FlowLayout.CENTER));
JPanel generalButtonsPane = new JPanel(new GridLayout(2, 1));

JPanel firstButtonsRow = new JPanel();
Expand Down
8 changes: 4 additions & 4 deletions src/ru/krlvm/powertunnel/updater/UpdateNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ public void run() {
public void run() {
PowerTunnel.optionsFrame.updateAvailable(version);
if(PowerTunnel.isMainFrameVisible() || PowerTunnel.optionsFrame.isVisible()) {
JEditorPane message = UIUtility.getLabelWithHyperlinkSupport("" + PowerTunnel.NAME + " is ready to update!" +
JEditorPane message = UIUtility.getLabelWithHyperlinkSupport(PowerTunnel.NAME + " is ready to update!" +
"<br><br>" +
"Version: " + version + "<br>" +
"<br>" +
"Changelog: <a href=\"" + PowerTunnel.REPOSITORY_URL + "/releases/tag/v" + version + "\">view</a>" +
"<br>" +
"Download: <a href=\"" + PowerTunnel.REPOSITORY_URL + "/releases/download/v" + version + "/" + PowerTunnel.NAME + ".jar\">click here</a>" +
"<br><br>" +
"Visit <a href=\"" + PowerTunnel.REPOSITORY_URL + "\">GitHub repository</a>" +
"</body></html>", null);
JOptionPane.showMessageDialog(null, message, "" + PowerTunnel.NAME + " Updater", JOptionPane.INFORMATION_MESSAGE);
"Visit <a href=\"" + PowerTunnel.REPOSITORY_URL + "\">GitHub repository</a>",
null);
JOptionPane.showMessageDialog(null, message, PowerTunnel.NAME + " Updater", JOptionPane.INFORMATION_MESSAGE);
} else {
PowerTunnel.getTray().showNotification("An PowerTunnel update available");
}
Expand Down

0 comments on commit bbe66c8

Please sign in to comment.