about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.form72
-rw-r--r--client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java73
-rw-r--r--client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java2
-rw-r--r--client/trunk/src/com/fourisland/instadisc/InstaDiscView.java27
-rw-r--r--client/trunk/src/com/fourisland/instadisc/resources/AdvancedSettingsForm.properties2
5 files changed, 158 insertions, 18 deletions
diff --git a/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.form b/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.form index 6fb22bd..f561077 100644 --- a/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.form +++ b/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.form
@@ -26,6 +26,10 @@
26 <Group type="103" groupAlignment="1" attributes="0"> 26 <Group type="103" groupAlignment="1" attributes="0">
27 <Group type="102" alignment="0" attributes="0"> 27 <Group type="102" alignment="0" attributes="0">
28 <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> 28 <EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
29 <Component id="jLabel8" pref="351" max="32767" attributes="0"/>
30 </Group>
31 <Group type="102" alignment="0" attributes="0">
32 <EmptySpace min="-2" pref="36" max="-2" attributes="0"/>
29 <Component id="jLabel6" pref="351" max="32767" attributes="0"/> 33 <Component id="jLabel6" pref="351" max="32767" attributes="0"/>
30 </Group> 34 </Group>
31 <Group type="102" alignment="0" attributes="0"> 35 <Group type="102" alignment="0" attributes="0">
@@ -40,16 +44,28 @@
40 <EmptySpace min="-2" pref="18" max="-2" attributes="0"/> 44 <EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
41 <Component id="jSpinner1" pref="239" max="32767" attributes="0"/> 45 <Component id="jSpinner1" pref="239" max="32767" attributes="0"/>
42 </Group> 46 </Group>
43 <Group type="102" alignment="0" attributes="0">
44 <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
45 <EmptySpace max="-2" attributes="0"/>
46 <Component id="jSpinner2" pref="239" max="32767" attributes="0"/>
47 </Group>
48 <Component id="jLabel2" alignment="0" min="-2" pref="347" max="-2" attributes="0"/> 47 <Component id="jLabel2" alignment="0" min="-2" pref="347" max="-2" attributes="0"/>
49 </Group> 48 </Group>
50 </Group> 49 </Group>
51 </Group> 50 </Group>
52 </Group> 51 </Group>
52 <Group type="102" alignment="0" attributes="0">
53 <EmptySpace min="-2" pref="24" max="-2" attributes="0"/>
54 <Group type="103" groupAlignment="0" attributes="0">
55 <Group type="102" alignment="0" attributes="0">
56 <Component id="jLabel7" min="-2" max="-2" attributes="0"/>
57 <EmptySpace type="separate" max="-2" attributes="0"/>
58 <Component id="jSpinner3" min="-2" pref="112" max="-2" attributes="0"/>
59 <EmptySpace max="-2" attributes="0"/>
60 <Component id="jComboBox1" pref="121" max="32767" attributes="0"/>
61 </Group>
62 <Group type="102" alignment="0" attributes="0">
63 <Component id="jLabel5" min="-2" max="-2" attributes="0"/>
64 <EmptySpace max="-2" attributes="0"/>
65 <Component id="jSpinner2" pref="239" max="32767" attributes="0"/>
66 </Group>
67 </Group>
68 </Group>
53 <Group type="102" alignment="1" attributes="0"> 69 <Group type="102" alignment="1" attributes="0">
54 <EmptySpace pref="341" max="32767" attributes="0"/> 70 <EmptySpace pref="341" max="32767" attributes="0"/>
55 <Component id="jButton1" min="-2" max="-2" attributes="0"/> 71 <Component id="jButton1" min="-2" max="-2" attributes="0"/>
@@ -75,18 +91,26 @@
75 <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> 91 <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
76 <Component id="jSpinner1" alignment="3" min="-2" max="-2" attributes="0"/> 92 <Component id="jSpinner1" alignment="3" min="-2" max="-2" attributes="0"/>
77 </Group> 93 </Group>
78 <EmptySpace min="-2" max="-2" attributes="0"/> 94 <EmptySpace max="-2" attributes="0"/>
79 <Component id="jLabel4" pref="68" max="32767" attributes="0"/> 95 <Component id="jLabel4" min="-2" pref="68" max="-2" attributes="0"/>
80 <EmptySpace min="-2" max="-2" attributes="0"/> 96 <EmptySpace max="-2" attributes="0"/>
81 <Group type="103" groupAlignment="3" attributes="0"> 97 <Group type="103" groupAlignment="3" attributes="0">
82 <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
83 <Component id="jSpinner2" alignment="3" min="-2" max="-2" attributes="0"/> 98 <Component id="jSpinner2" alignment="3" min="-2" max="-2" attributes="0"/>
99 <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/>
84 </Group> 100 </Group>
85 <EmptySpace max="-2" attributes="0"/> 101 <EmptySpace max="-2" attributes="0"/>
86 <Component id="jLabel6" min="-2" pref="51" max="-2" attributes="0"/> 102 <Component id="jLabel6" min="-2" pref="51" max="-2" attributes="0"/>
87 <EmptySpace max="-2" attributes="0"/> 103 <EmptySpace max="-2" attributes="0"/>
104 <Group type="103" groupAlignment="3" attributes="0">
105 <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/>
106 <Component id="jSpinner3" alignment="3" min="-2" max="-2" attributes="0"/>
107 <Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/>
108 </Group>
109 <EmptySpace max="-2" attributes="0"/>
110 <Component id="jLabel8" min="-2" pref="85" max="-2" attributes="0"/>
111 <EmptySpace max="-2" attributes="0"/>
88 <Component id="jButton1" min="-2" max="-2" attributes="0"/> 112 <Component id="jButton1" min="-2" max="-2" attributes="0"/>
89 <EmptySpace min="-2" max="-2" attributes="0"/> 113 <EmptySpace max="32767" attributes="0"/>
90 </Group> 114 </Group>
91 </Group> 115 </Group>
92 </DimensionLayout> 116 </DimensionLayout>
@@ -148,5 +172,33 @@
148 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 172 <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/>
149 </Events> 173 </Events>
150 </Component> 174 </Component>
175 <Component class="javax.swing.JLabel" name="jLabel7">
176 <Properties>
177 <Property name="text" type="java.lang.String" resourceKey="jLabel7.text"/>
178 <Property name="name" type="java.lang.String" value="jLabel7" noResource="true"/>
179 </Properties>
180 </Component>
181 <Component class="javax.swing.JSpinner" name="jSpinner3">
182 <Properties>
183 <Property name="name" type="java.lang.String" value="jSpinner3" noResource="true"/>
184 </Properties>
185 </Component>
186 <Component class="javax.swing.JComboBox" name="jComboBox1">
187 <Properties>
188 <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
189 <StringArray count="2">
190 <StringItem index="0" value="day"/>
191 <StringItem index="1" value="hour"/>
192 </StringArray>
193 </Property>
194 <Property name="name" type="java.lang.String" value="jComboBox1" noResource="true"/>
195 </Properties>
196 </Component>
197 <Component class="javax.swing.JLabel" name="jLabel8">
198 <Properties>
199 <Property name="text" type="java.lang.String" resourceKey="jLabel8.text"/>
200 <Property name="name" type="java.lang.String" value="jLabel8" noResource="true"/>
201 </Properties>
202 </Component>
151 </SubComponents> 203 </SubComponents>
152</Form> 204</Form>
diff --git a/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java b/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java index 753bbe3..14469ea 100644 --- a/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java +++ b/client/trunk/src/com/fourisland/instadisc/AdvancedSettingsForm.java
@@ -33,6 +33,20 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
33 sm2.setMinimum(1); 33 sm2.setMinimum(1);
34 sm2.setStepSize(1); 34 sm2.setStepSize(1);
35 jSpinner2.setModel(sm2); 35 jSpinner2.setModel(sm2);
36
37 SpinnerNumberModel sm3 = new SpinnerNumberModel();
38 sm3.setValue(Integer.decode(Wrapper.getConfig("ipCheckValue")));
39 sm3.setMaximum(23);
40 sm3.setMinimum(1);
41 sm3.setStepSize(1);
42 jSpinner3.setModel(sm3);
43
44 if (Wrapper.getConfig("ipCheckUnit").equals("day"))
45 {
46 jComboBox1.setSelectedIndex(0);
47 } else {
48 jComboBox1.setSelectedIndex(1);
49 }
36 } 50 }
37 51
38 /** This method is called from within the constructor to 52 /** This method is called from within the constructor to
@@ -52,6 +66,10 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
52 jSpinner2 = new javax.swing.JSpinner(); 66 jSpinner2 = new javax.swing.JSpinner();
53 jLabel6 = new javax.swing.JLabel(); 67 jLabel6 = new javax.swing.JLabel();
54 jButton1 = new javax.swing.JButton(); 68 jButton1 = new javax.swing.JButton();
69 jLabel7 = new javax.swing.JLabel();
70 jSpinner3 = new javax.swing.JSpinner();
71 jComboBox1 = new javax.swing.JComboBox();
72 jLabel8 = new javax.swing.JLabel();
55 73
56 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); 74 setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
57 setName("Form"); // NOI18N 75 setName("Form"); // NOI18N
@@ -88,6 +106,17 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
88 } 106 }
89 }); 107 });
90 108
109 jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
110 jLabel7.setName("jLabel7"); // NOI18N
111
112 jSpinner3.setName("jSpinner3"); // NOI18N
113
114 jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "day", "hour" }));
115 jComboBox1.setName("jComboBox1"); // NOI18N
116
117 jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
118 jLabel8.setName("jLabel8"); // NOI18N
119
91 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 120 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
92 getContentPane().setLayout(layout); 121 getContentPane().setLayout(layout);
93 layout.setHorizontalGroup( 122 layout.setHorizontalGroup(
@@ -96,6 +125,9 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
96 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 125 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
97 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() 126 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
98 .addGap(36, 36, 36) 127 .addGap(36, 36, 36)
128 .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE))
129 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
130 .addGap(36, 36, 36)
99 .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE)) 131 .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 351, Short.MAX_VALUE))
100 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() 132 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
101 .addContainerGap() 133 .addContainerGap()
@@ -108,11 +140,20 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
108 .addComponent(jLabel3) 140 .addComponent(jLabel3)
109 .addGap(18, 18, 18) 141 .addGap(18, 18, 18)
110 .addComponent(jSpinner1, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)) 142 .addComponent(jSpinner1, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE))
111 .addGroup(layout.createSequentialGroup()
112 .addComponent(jLabel5)
113 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
114 .addComponent(jSpinner2, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE))
115 .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 347, javax.swing.GroupLayout.PREFERRED_SIZE))))) 143 .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 347, javax.swing.GroupLayout.PREFERRED_SIZE)))))
144 .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
145 .addGap(24, 24, 24)
146 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
147 .addGroup(layout.createSequentialGroup()
148 .addComponent(jLabel7)
149 .addGap(18, 18, 18)
150 .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
151 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
152 .addComponent(jComboBox1, 0, 121, Short.MAX_VALUE))
153 .addGroup(layout.createSequentialGroup()
154 .addComponent(jLabel5)
155 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
156 .addComponent(jSpinner2, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE))))
116 .addGroup(layout.createSequentialGroup() 157 .addGroup(layout.createSequentialGroup()
117 .addContainerGap(341, Short.MAX_VALUE) 158 .addContainerGap(341, Short.MAX_VALUE)
118 .addComponent(jButton1)) 159 .addComponent(jButton1))
@@ -133,16 +174,23 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
133 .addComponent(jLabel3) 174 .addComponent(jLabel3)
134 .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 175 .addComponent(jSpinner1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
135 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 176 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
136 .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 68, Short.MAX_VALUE) 177 .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
137 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 178 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
138 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 179 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
139 .addComponent(jLabel5) 180 .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
140 .addComponent(jSpinner2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 181 .addComponent(jLabel5))
141 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 182 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
142 .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) 183 .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
143 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 184 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
185 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
186 .addComponent(jLabel7)
187 .addComponent(jSpinner3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
188 .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
189 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
190 .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
191 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
144 .addComponent(jButton1) 192 .addComponent(jButton1)
145 .addContainerGap()) 193 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
146 ); 194 );
147 195
148 pack(); 196 pack();
@@ -151,6 +199,11 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
151 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 199 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
152 Wrapper.setConfig("itemBufferSize", ((Integer) jSpinner1.getValue()).toString()); 200 Wrapper.setConfig("itemBufferSize", ((Integer) jSpinner1.getValue()).toString());
153 Wrapper.setConfig("verIDBufferSize", ((Integer) jSpinner2.getValue()).toString()); 201 Wrapper.setConfig("verIDBufferSize", ((Integer) jSpinner2.getValue()).toString());
202 Wrapper.setConfig("ipCheckValue", ((Integer) jSpinner3.getValue()).toString());
203 Wrapper.setConfig("ipCheckUnit", (String) jComboBox1.getSelectedItem());
204
205 ((InstaDiscView) InstaDiscApp.getApplication().getMainView()).updateTimer();
206
154 setVisible(false); 207 setVisible(false);
155 }//GEN-LAST:event_jButton1ActionPerformed 208 }//GEN-LAST:event_jButton1ActionPerformed
156 209
@@ -173,14 +226,18 @@ public class AdvancedSettingsForm extends javax.swing.JDialog {
173 226
174 // Variables declaration - do not modify//GEN-BEGIN:variables 227 // Variables declaration - do not modify//GEN-BEGIN:variables
175 private javax.swing.JButton jButton1; 228 private javax.swing.JButton jButton1;
229 private javax.swing.JComboBox jComboBox1;
176 private javax.swing.JLabel jLabel1; 230 private javax.swing.JLabel jLabel1;
177 private javax.swing.JLabel jLabel2; 231 private javax.swing.JLabel jLabel2;
178 private javax.swing.JLabel jLabel3; 232 private javax.swing.JLabel jLabel3;
179 private javax.swing.JLabel jLabel4; 233 private javax.swing.JLabel jLabel4;
180 private javax.swing.JLabel jLabel5; 234 private javax.swing.JLabel jLabel5;
181 private javax.swing.JLabel jLabel6; 235 private javax.swing.JLabel jLabel6;
236 private javax.swing.JLabel jLabel7;
237 private javax.swing.JLabel jLabel8;
182 private javax.swing.JSpinner jSpinner1; 238 private javax.swing.JSpinner jSpinner1;
183 private javax.swing.JSpinner jSpinner2; 239 private javax.swing.JSpinner jSpinner2;
240 private javax.swing.JSpinner jSpinner3;
184 // End of variables declaration//GEN-END:variables 241 // End of variables declaration//GEN-END:variables
185 242
186} 243}
diff --git a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java index 719f27d..01a3c02 100644 --- a/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java +++ b/client/trunk/src/com/fourisland/instadisc/FirstRun/Step2.java
@@ -168,6 +168,8 @@ public class Step2 extends javax.swing.JDialog {
168 Wrapper.setConfig("itemBufferSize", "10"); 168 Wrapper.setConfig("itemBufferSize", "10");
169 Wrapper.setConfig("verIDBufferSize", "100"); 169 Wrapper.setConfig("verIDBufferSize", "100");
170 Wrapper.setConfig("nextFilterID", "0"); 170 Wrapper.setConfig("nextFilterID", "0");
171 Wrapper.setConfig("ipCheckValue", "1");
172 Wrapper.setConfig("ipCheckUnit", "day");
171 Wrapper.setConfig("initCheck", "done"); 173 Wrapper.setConfig("initCheck", "done");
172 174
173 StepEndResults.ok = true; 175 StepEndResults.ok = true;
diff --git a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java index be96e8a..b706126 100644 --- a/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java +++ b/client/trunk/src/com/fourisland/instadisc/InstaDiscView.java
@@ -115,6 +115,8 @@ public class InstaDiscView extends FrameView {
115 115
116 XmlRpc xmlrpc = new XmlRpc("requestRetained"); 116 XmlRpc xmlrpc = new XmlRpc("requestRetained");
117 xmlrpc.execute(); 117 xmlrpc.execute();
118
119 updateTimer();
118 } 120 }
119 121
120 @Action 122 @Action
@@ -367,10 +369,35 @@ public class InstaDiscView extends FrameView {
367 private final Icon[] busyIcons = new Icon[15]; 369 private final Icon[] busyIcons = new Icon[15];
368 private int busyIconIndex = 0; 370 private int busyIconIndex = 0;
369 private JDialog aboutBox; 371 private JDialog aboutBox;
372 private Timer ipCheckTimer;
370 373
371 public void refreshItemPane() { 374 public void refreshItemPane() {
372 Item items[] = Wrapper.getAllItem(); 375 Item items[] = Wrapper.getAllItem();
373 jList1.setListData(items); 376 jList1.setListData(items);
374 jList1.repaint(); 377 jList1.repaint();
375 } 378 }
379
380 public void updateTimer() {
381 int delay = 0;
382
383 if (ipCheckTimer.isRunning()) {
384 ipCheckTimer.stop();
385 }
386
387 if (Wrapper.getConfig("ipCheckUnit").equals("day")) {
388 delay = 1000 * 60 * 60 * 24 * Integer.decode(Wrapper.getConfig("ipCheckValue"));
389 } else if (Wrapper.getConfig("ipCheckUnit").equals("hour")) {
390 delay = 1000 * 60 * 60 * Integer.decode(Wrapper.getConfig("ipCheckValue"));
391 }
392
393 ipCheckTimer = new Timer(delay, new ActionListener() {
394
395 public void actionPerformed(ActionEvent arg0) {
396 XmlRpc xmlrpc = new XmlRpc("checkRegistration");
397 xmlrpc.execute();
398 }
399 });
400
401 ipCheckTimer.start();
402 }
376} 403}
diff --git a/client/trunk/src/com/fourisland/instadisc/resources/AdvancedSettingsForm.properties b/client/trunk/src/com/fourisland/instadisc/resources/AdvancedSettingsForm.properties index 55acc2a..e05a8fb 100644 --- a/client/trunk/src/com/fourisland/instadisc/resources/AdvancedSettingsForm.properties +++ b/client/trunk/src/com/fourisland/instadisc/resources/AdvancedSettingsForm.properties
@@ -7,3 +7,5 @@ jLabel4.text=<HTML>This is the number of items that you would like to keep on th
7jLabel5.text=VerID Buffer Size: 7jLabel5.text=VerID Buffer Size:
8jLabel6.text=<HTML>If this is a higher value, less viral Items will get in, but there'd be more chance of re-contacting the server, and thus more Internet usage. 8jLabel6.text=<HTML>If this is a higher value, less viral Items will get in, but there'd be more chance of re-contacting the server, and thus more Internet usage.
9jButton1.text=Done 9jButton1.text=Done
10jLabel7.text=IP Timer Interval:
11jLabel8.text=<HTML>This is how often InstaDisc contacts the Central Server to see if your IP Address has changed. If your IP Address has changed and the Central Server doesn't know about it yet, you won't be able to recieve InstaDisc Items.