Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pitterling fix/aboutbox #100

Closed
wants to merge 8 commits into from
10 changes: 10 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

2006-2010 xcherif - Alexandre Cherif
2006-2010 Max
Mar 2016 ynamiki
Mar 2016 vlsi - Vladimir Sitnikov
Apr 2016 scr34m - Győrvári Gábor
Apr 2016 pitterling - Peter Pitterling
Nov 2016 vest
Mar 2017 ikedaj - Junko IKEDA
May 2017 elkrieg
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above does not look like a markdown format.
At least GitHub renders it in a weird way: https://github.com/Pitterling/ksar/blob/f39cc47db31e0123a0fc2cd5ba1603ca9ddf80d1/CONTRIBUTORS.md

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something like

* 2006-2010	xcherif 	- Alexandre Cherif
* 2006-2010   Max
...

would probably do

40 changes: 36 additions & 4 deletions src/main/java/net/atomique/ksar/ui/AboutBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@

import net.atomique.ksar.VersionNumber;

import java.awt.Cursor;
import java.awt.Desktop;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JLabel;


public class AboutBox extends javax.swing.JDialog {

Expand Down Expand Up @@ -79,17 +88,28 @@ private void initComponents() {

jPanel2.setLayout(new javax.swing.BoxLayout(jPanel2, javax.swing.BoxLayout.PAGE_AXIS));

urllabel.setText("website: http://sourceforge.net/projects/ksar/");
String url;

url = "https://github.com/vlsi/ksar";
urllabel.setText(String.format("<html> Website : <a href=\"\">%s</a></html>", url ));
urllabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
jPanel2.add(urllabel);
goWebsite(urllabel, url);

authorlabel.setText("Author: xavier cherif");
url = "https://github.com/vlsi/ksar/CONTRIBUTORS.md";
authorlabel.setText(String.format("<html> Authors : <a href=\"\">%s</a></html>", url ));
authorlabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
jPanel2.add(authorlabel);
goWebsite(authorlabel, url);

licencelabel.setText("License: BSD (see LICENCE file)");
licencelabel.setText("License : BSD (see LICENCE file)");
jPanel2.add(licencelabel);

tipslabel.setText("ARS LONGA, VITA BREVIS");
url = "http://sourceforge.net/projects/ksar/";
tipslabel.setText(String.format("<html> Fork of : <a href=\"\">%s</a></html>", url ));
tipslabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
jPanel2.add(tipslabel);
goWebsite(tipslabel, url);

getContentPane().add(jPanel2);

Expand All @@ -112,6 +132,18 @@ private void OkButtonActionPerformed(
dispose();
} //GEN-LAST:event_OkButtonActionPerformed

private void goWebsite(JLabel website, String url) {
website.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
try {
Desktop.getDesktop().browse(new URI(url));
} catch (URISyntaxException | IOException ex) {
//It looks like there's a problem
}
}
});
}

// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton OkButton;
Expand Down