about summary refs log tree commit diff stats
path: root/client/trunk/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'client/trunk/src/com')
-rw-r--r--client/trunk/src/com/fourisland/instadisc/FirstRun/Step2A.java9
-rw-r--r--client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A.properties10
-rw-r--r--client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A_1.properties11
-rw-r--r--client/trunk/src/com/fourisland/instadisc/XmlRpc.java16
4 files changed, 29 insertions, 17 deletions
diff --git a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2A.java b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2A.java index c027ef6..e4e1b2d 100644 --- a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2A.java +++ b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2A.java
@@ -138,12 +138,15 @@ public class Step2A extends javax.swing.JDialog {
138 MD5 md5 = new MD5(jPasswordField1.getPassword()); 138 MD5 md5 = new MD5(jPasswordField1.getPassword());
139 String password = md5.hash(); 139 String password = md5.hash();
140 140
141 XmlRpc xmlrpc = new XmlRpc("createUser", jTextField1.getText(), password); 141 XmlRpc xmlrpc = new XmlRpc("createUser", "", "");
142 xmlrpc.resetParams();
143 xmlrpc.addParam(jTextField1.getText());
144 xmlrpc.addParam(password);
142 String usr = (String) xmlrpc.execute(); 145 String usr = (String) xmlrpc.execute();
143 146
144 if (!usr.equals(jTextField1.getText())) 147 if (!usr.equals(jTextField1.getText()))
145 { 148 {
146 jLabel2.setText("Error: The specified username is already taken. Why don't you try: " + usr); 149 jLabel2.setText("Error: The specified username is already taken.<BR>Why don't you try: " + usr);
147 } else { 150 } else {
148 Wrapper.setConfig("username", jTextField1.getText()); 151 Wrapper.setConfig("username", jTextField1.getText());
149 Wrapper.setConfig("password", password); 152 Wrapper.setConfig("password", password);
@@ -167,7 +170,7 @@ public class Step2A extends javax.swing.JDialog {
167 java.awt.EventQueue.invokeLater(new Runnable() { 170 java.awt.EventQueue.invokeLater(new Runnable() {
168 171
169 public void run() { 172 public void run() {
170 Step2 dialog = new Step2(new javax.swing.JFrame(), true); 173 Step2A dialog = new Step2A(new javax.swing.JFrame(), true);
171 dialog.addWindowListener(new java.awt.event.WindowAdapter() { 174 dialog.addWindowListener(new java.awt.event.WindowAdapter() {
172 175
173 public void windowClosing(java.awt.event.WindowEvent e) { 176 public void windowClosing(java.awt.event.WindowEvent e) {
diff --git a/client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A.properties b/client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A.properties new file mode 100644 index 0000000..9eae847 --- /dev/null +++ b/client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A.properties
@@ -0,0 +1,10 @@
1jLabel1.text=Central Server Details
2#NOI18N
3jLabel1.font=DejaVu Sans-Plain-18
4jLabel3.text=Username:
5jTextField1.text=
6jLabel4.text=Password:
7jButton1.text=Next
8jLabel2.text=<HTML>If you don't have an InstaDisc account, you can make one here. If you do, though, go back and click "I have an account"
9jPasswordField1.text=
10jButton2.text=Back \ No newline at end of file
diff --git a/client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A_1.properties b/client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A_1.properties new file mode 100644 index 0000000..65a8a60 --- /dev/null +++ b/client/trunk/src/com/fourisland/instadisc/FirstRun/resources/Step2A_1.properties
@@ -0,0 +1,11 @@
1
2jLabel1.text=Central Server Details
3#NOI18N
4jLabel1.font=DejaVu Sans-Plain-18
5jLabel2.text=<HTML>If you don't have an InstaDisc account yet, you can make one here. If you do, though, go back and click "I have an account"
6jLabel3.text=Username:
7jLabel4.text=Password:
8jTextField1.text=
9jPasswordField1.text=
10jButton1.text=Next
11jButton2.text=Back
diff --git a/client/trunk/src/com/fourisland/instadisc/XmlRpc.java b/client/trunk/src/com/fourisland/instadisc/XmlRpc.java index 86bff6f..e8b2d94 100644 --- a/client/trunk/src/com/fourisland/instadisc/XmlRpc.java +++ b/client/trunk/src/com/fourisland/instadisc/XmlRpc.java
@@ -23,22 +23,9 @@ public class XmlRpc {
23 private String function; 23 private String function;
24 private Object[] params; 24 private Object[] params;
25 private int step = 3; 25 private int step = 3;
26 private String url;
27 26
28 public XmlRpc(String function) { 27 public XmlRpc(String function) {
29 this.function = function; 28 this.function = function;
30 this.url = "http://central.fourisland.com/xmlrpc.php";
31
32 Verification ver = new Verification();
33 params = new Object[3];
34 params[0] = ver.getUsername();
35 params[1] = ver.getHash();
36 params[2] = ver.getID();
37 }
38
39 public XmlRpc(String url, String function) {
40 this.function = function;
41 this.url = url;
42 29
43 Verification ver = new Verification(); 30 Verification ver = new Verification();
44 params = new Object[3]; 31 params = new Object[3];
@@ -76,7 +63,7 @@ public class XmlRpc {
76 Object result = null; 63 Object result = null;
77 try { 64 try {
78 XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl(); 65 XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
79 config.setServerURL(new URL("http://central.fourisland.com/xmlrpc.php")); 66 config.setServerURL(new URL("http://rpc.instadisc.org/"));
80 XmlRpcClient client = new XmlRpcClient(); 67 XmlRpcClient client = new XmlRpcClient();
81 client.setConfig(config); 68 client.setConfig(config);
82 69
@@ -92,5 +79,6 @@ public class XmlRpc {
92 public void resetParams() 79 public void resetParams()
93 { 80 {
94 params = new Object[] {}; 81 params = new Object[] {};
82 step = 0;
95 } 83 }
96} 84}