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/Step2.java1
-rw-r--r--client/trunk/src/com/fourisland/instadisc/IDItemListCellRenderer.java7
-rw-r--r--client/trunk/src/com/fourisland/instadisc/InstaDiscApp.java34
-rw-r--r--client/trunk/src/com/fourisland/instadisc/InstaDiscView.java2
4 files changed, 15 insertions, 29 deletions
diff --git a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java index dfbc89e..7affbae 100644 --- a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java +++ b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java
@@ -175,6 +175,7 @@ public class Step2 extends javax.swing.JDialog {
175 Wrapper.setConfig("password", md5.hash()); 175 Wrapper.setConfig("password", md5.hash());
176 Wrapper.setConfig("centralServerURL", jTextField3.getText()); 176 Wrapper.setConfig("centralServerURL", jTextField3.getText());
177 Wrapper.setConfig("itemsToHold", "10"); 177 Wrapper.setConfig("itemsToHold", "10");
178 Wrapper.setConfig("initCheck", "done");
178 179
179 StepEndResults.ok = true; 180 StepEndResults.ok = true;
180 this.setVisible(false); 181 this.setVisible(false);
diff --git a/client/trunk/src/com/fourisland/instadisc/IDItemListCellRenderer.java b/client/trunk/src/com/fourisland/instadisc/IDItemListCellRenderer.java index 3d057e2..644217f 100644 --- a/client/trunk/src/com/fourisland/instadisc/IDItemListCellRenderer.java +++ b/client/trunk/src/com/fourisland/instadisc/IDItemListCellRenderer.java
@@ -19,13 +19,6 @@ import javax.swing.ListCellRenderer;
19 * @author hatkirby 19 * @author hatkirby
20 */ 20 */
21public class IDItemListCellRenderer extends JLabel implements ListCellRenderer { 21public class IDItemListCellRenderer extends JLabel implements ListCellRenderer {
22
23 String base;
24
25 public IDItemListCellRenderer(String base)
26 {
27 this.base = base;
28 }
29 22
30 public Component getListCellRendererComponent(JList arg0, Object arg1, int arg2, boolean arg3, boolean arg4) { 23 public Component getListCellRendererComponent(JList arg0, Object arg1, int arg2, boolean arg3, boolean arg4) {
31 Item item = (Item) arg1; 24 Item item = (Item) arg1;
diff --git a/client/trunk/src/com/fourisland/instadisc/InstaDiscApp.java b/client/trunk/src/com/fourisland/instadisc/InstaDiscApp.java index 789dc75..cd3f1dd 100644 --- a/client/trunk/src/com/fourisland/instadisc/InstaDiscApp.java +++ b/client/trunk/src/com/fourisland/instadisc/InstaDiscApp.java
@@ -13,8 +13,6 @@ import org.jdesktop.application.SingleFrameApplication;
13 * The main class of the application. 13 * The main class of the application.
14 */ 14 */
15public class InstaDiscApp extends SingleFrameApplication { 15public class InstaDiscApp extends SingleFrameApplication {
16
17 public static String base;
18 16
19 /** 17 /**
20 * At startup create and show the main frame of the application. 18 * At startup create and show the main frame of the application.
@@ -45,28 +43,22 @@ public class InstaDiscApp extends SingleFrameApplication {
45 * Main method launching the application. 43 * Main method launching the application.
46 */ 44 */
47 public static void main(String[] args) { 45 public static void main(String[] args) {
48 if (args.length > 0) { 46 File db = new File(System.getProperty("user.home") + File.separator + ".instadisc");
49 base = args[0]; 47 if (!db.exists()) {
50 48 db.mkdir();
51 File db = new File(args[0] + "db"); 49 }
52 if (!db.exists()) { 50
53 db.mkdir(); 51 Wrapper.init(db.getAbsolutePath());
54 } 52 if (!Wrapper.getConfig("initCheck").equals("done")) {
55 53 Thread th = new Thread(new FirstRunWizard());
56 Wrapper.init(args[0]); 54 th.start();
57 if (args.length > 1) { 55 } else {
58 if (args[1].equals("-r")) { 56 if ((args.length > 0) && (args[0].equals("-r"))) {
59 XmlRpc xmlrpc = new XmlRpc("requestRetained"); 57 XmlRpc xmlrpc = new XmlRpc("requestRetained");
60 xmlrpc.execute(); 58 xmlrpc.execute();
61 } else if (args[1].equals("-n")) {
62 Thread th = new Thread(new FirstRunWizard());
63 th.start();
64 }
65 } else { 59 } else {
66 launch(InstaDiscApp.class, args); 60 launch(InstaDiscApp.class, args);
67 } 61 }
68 } else {
69 System.out.println("Oops, you seem to be running this application incorrectly. Try running it using the startup script provided.");
70 } 62 }
71 } 63 }
72} 64}
diff --git a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java index d2362dd..70be2c1 100644 --- a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java +++ b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java
@@ -90,7 +90,7 @@ public class InstaDiscView extends FrameView {
90 } 90 }
91 }); 91 });
92 92
93 jList1.setCellRenderer(new IDItemListCellRenderer(InstaDiscApp.base)); 93 jList1.setCellRenderer(new IDItemListCellRenderer());
94 jList1.setModel(lm); 94 jList1.setModel(lm);
95 refreshItemPane(); 95 refreshItemPane();
96 96