Renamed translator ItoopieTranslator -> Transl.

Changed http into https.
Added support storing ssl certs.
Added a GUI for confirming/denying/overwriting certs.
This commit is contained in:
dev
2011-07-01 06:34:21 +00:00
parent a3d5cefb3d
commit a1546b7027
11 changed files with 365 additions and 103 deletions

View File

@ -10,7 +10,7 @@ import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.SwingWorker;
import net.i2p.itoopie.i18n.ItoopieTranslator;
import net.i2p.itoopie.i18n.Transl;
import net.i2p.itoopie.i2pcontrol.JSONInterface;
import net.i2p.itoopie.util.BrowseException;
@ -50,35 +50,35 @@ public class Main {
frame.getContentPane().setLayout(null);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JButton btnStop = new JButton(ItoopieTranslator._("Stop I2P"));
JButton btnStop = new JButton(Transl._("Stop I2P"));
btnStop.setBounds(293, 91, 125, 25);
frame.getContentPane().add(btnStop);
JLabel lblStop = new JLabel(ItoopieTranslator._("Push to stop I2P"));
JLabel lblStop = new JLabel(Transl._("Push to stop I2P"));
lblStop.setBounds(293, 78, 125, 15);
frame.getContentPane().add(lblStop);
JButton btnStart = new JButton(ItoopieTranslator._("Start I2P"));
JButton btnStart = new JButton(Transl._("Start I2P"));
btnStart.setBounds(43, 91, 125, 25);
frame.getContentPane().add(btnStart);
JLabel lblStart = new JLabel(ItoopieTranslator._("Push to start I2P"));
JLabel lblStart = new JLabel(Transl._("Push to start I2P"));
lblStart.setBounds(42, 78, 125, 15);
frame.getContentPane().add(lblStart);
JLabel lblGetRate = new JLabel(ItoopieTranslator._("Get bwSend rate"));
JLabel lblGetRate = new JLabel(Transl._("Get bwSend rate"));
lblGetRate.setBounds(293, 172, 125, 15);
frame.getContentPane().add(lblGetRate);
final JLabel lblDispRate = new JLabel(ItoopieTranslator._("Rate not update yet, push button."));
final JLabel lblDispRate = new JLabel(Transl._("Rate not update yet, push button."));
lblDispRate.setBounds(0,255,450,15);
frame.getContentPane().add(lblDispRate);
JButton btnGetRate = new JButton(ItoopieTranslator._("Update"));
JButton btnGetRate = new JButton(Transl._("Update"));
btnGetRate.setBounds(293, 185, 125, 25);
frame.getContentPane().add(btnGetRate);
JButton btnConnect = new JButton(ItoopieTranslator._("Connect"));
JButton btnConnect = new JButton(Transl._("Connect"));
btnConnect.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
@ -86,7 +86,7 @@ public class Main {
btnConnect.setBounds(43, 185, 125, 25);
frame.getContentPane().add(btnConnect);
JLabel lblConnect = new JLabel(ItoopieTranslator._("Connect to I2P"));
JLabel lblConnect = new JLabel(Transl._("Connect to I2P"));
lblConnect.setBounds(43, 172, 125, 15);
frame.getContentPane().add(lblConnect);
@ -120,7 +120,7 @@ public class Main {
@Override
protected Object doInBackground() throws Exception {
double rate = JSONInterface.getRateStat("bw.sendRate", 3600000L);
lblDispRate.setText(ItoopieTranslator._("Current bw.sendRate: " + rate));
lblDispRate.setText(Transl._("Current bw.sendRate: " + rate));
return null;
}
}.execute();