diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-29 01:22:47 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-29 01:22:47 +0000 |
commit | 2c6e3e362bf614a2e67dba5ec3e1c0d247834b69 (patch) | |
tree | fb9cf982db67ce083361f69c49be814902282de5 /client/trunk/src/com | |
parent | 386dbcc5e270df1514177dc6f2f4f7c32391d9a1 (diff) | |
download | instadisc-2c6e3e362bf614a2e67dba5ec3e1c0d247834b69.tar.gz instadisc-2c6e3e362bf614a2e67dba5ec3e1c0d247834b69.tar.bz2 instadisc-2c6e3e362bf614a2e67dba5ec3e1c0d247834b69.zip |
Client: Fixed a few bugs with registration
Also changed XML-RPC URL constant. Fixes #63 and refs #64
Diffstat (limited to 'client/trunk/src/com')
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 @@ | |||
1 | jLabel1.text=Central Server Details | ||
2 | #NOI18N | ||
3 | jLabel1.font=DejaVu Sans-Plain-18 | ||
4 | jLabel3.text=Username: | ||
5 | jTextField1.text= | ||
6 | jLabel4.text=Password: | ||
7 | jButton1.text=Next | ||
8 | jLabel2.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" | ||
9 | jPasswordField1.text= | ||
10 | jButton2.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 | |||
2 | jLabel1.text=Central Server Details | ||
3 | #NOI18N | ||
4 | jLabel1.font=DejaVu Sans-Plain-18 | ||
5 | jLabel2.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" | ||
6 | jLabel3.text=Username: | ||
7 | jLabel4.text=Password: | ||
8 | jTextField1.text= | ||
9 | jPasswordField1.text= | ||
10 | jButton1.text=Next | ||
11 | jButton2.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 | } |