Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperGui.java |
— | — | @@ -105,6 +105,11 @@ |
106 | 106 | checkSchema(); |
107 | 107 | } |
108 | 108 | |
| 109 | + void setSchema(String schema) { |
| 110 | + this.schema = schema; |
| 111 | + checkSchema(); |
| 112 | + } |
| 113 | + |
109 | 114 | void checkSchema() { |
110 | 115 | schemaReady = false; |
111 | 116 | if (connected) { |
Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperWindow.java |
— | — | @@ -186,6 +186,14 @@ |
187 | 187 | backend.setDbname(dbnameText.getText()); |
188 | 188 | } |
189 | 189 | |
| 190 | + protected void onSchema14RadioActionPerformed(java.awt.event.ActionEvent evt) { |
| 191 | + backend.setSchema("1.4"); |
| 192 | + } |
| 193 | + |
| 194 | + protected void onSchema15RadioActionPerformed(java.awt.event.ActionEvent evt) { |
| 195 | + backend.setSchema("1.5"); |
| 196 | + } |
| 197 | + |
190 | 198 | /* ---- more random crap ---- */ |
191 | 199 | |
192 | 200 | File chooseFile(String message) { |
Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperWindowForm.java |
— | — | @@ -167,12 +167,22 @@ |
168 | 168 | schema14Radio.setText("1.4 (cur, old)"); |
169 | 169 | schema14Radio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
170 | 170 | schema14Radio.setMargin(new java.awt.Insets(0, 0, 0, 0)); |
| 171 | + schema14Radio.addActionListener(new java.awt.event.ActionListener() { |
| 172 | + public void actionPerformed(java.awt.event.ActionEvent evt) { |
| 173 | + schema14RadioActionPerformed(evt); |
| 174 | + } |
| 175 | + }); |
171 | 176 | |
172 | 177 | schemaRadios.add(schema15Radio); |
173 | 178 | schema15Radio.setSelected(true); |
174 | 179 | schema15Radio.setText("1.5 (page, revision, text)"); |
175 | 180 | schema15Radio.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); |
176 | 181 | schema15Radio.setMargin(new java.awt.Insets(0, 0, 0, 0)); |
| 182 | + schema15Radio.addActionListener(new java.awt.event.ActionListener() { |
| 183 | + public void actionPerformed(java.awt.event.ActionEvent evt) { |
| 184 | + schema15RadioActionPerformed(evt); |
| 185 | + } |
| 186 | + }); |
177 | 187 | |
178 | 188 | prefixLabel.setText("Table prefix"); |
179 | 189 | |
— | — | @@ -313,6 +323,14 @@ |
314 | 324 | pack(); |
315 | 325 | }// </editor-fold>//GEN-END:initComponents |
316 | 326 | |
| 327 | + private void schema15RadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_schema15RadioActionPerformed |
| 328 | + onSchema15RadioActionPerformed(evt); // i hate you, netbeans gui editor |
| 329 | + }//GEN-LAST:event_schema15RadioActionPerformed |
| 330 | + |
| 331 | + private void schema14RadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_schema14RadioActionPerformed |
| 332 | + onSchema14RadioActionPerformed(evt); // i hate you, netbeans gui editor |
| 333 | + }//GEN-LAST:event_schema14RadioActionPerformed |
| 334 | + |
317 | 335 | private void dbnameTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_dbnameTextActionPerformed |
318 | 336 | onDbnameTextActionPerformed(evt); // i hate you, netbeans gui editor |
319 | 337 | }//GEN-LAST:event_dbnameTextActionPerformed |
— | — | @@ -397,4 +415,12 @@ |
398 | 416 | // TODO add your handling code here: |
399 | 417 | } |
400 | 418 | |
| 419 | + protected void onSchema14RadioActionPerformed(java.awt.event.ActionEvent evt) { |
| 420 | +// TODO add your handling code here: |
| 421 | + } |
| 422 | + |
| 423 | + protected void onSchema15RadioActionPerformed(java.awt.event.ActionEvent evt) { |
| 424 | +// TODO add your handling code here: |
| 425 | + } |
| 426 | + |
401 | 427 | } |
Index: trunk/mwdumper/src/org/mediawiki/dumper/gui/DumperWindowForm.form |
— | — | @@ -334,6 +334,9 @@ |
335 | 335 | <Insets value="[0, 0, 0, 0]"/> |
336 | 336 | </Property> |
337 | 337 | </Properties> |
| 338 | + <Events> |
| 339 | + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="schema14RadioActionPerformed"/> |
| 340 | + </Events> |
338 | 341 | </Component> |
339 | 342 | <Component class="javax.swing.JRadioButton" name="schema15Radio"> |
340 | 343 | <Properties> |
— | — | @@ -351,6 +354,9 @@ |
352 | 355 | <Insets value="[0, 0, 0, 0]"/> |
353 | 356 | </Property> |
354 | 357 | </Properties> |
| 358 | + <Events> |
| 359 | + <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="schema15RadioActionPerformed"/> |
| 360 | + </Events> |
355 | 361 | </Component> |
356 | 362 | <Component class="javax.swing.JLabel" name="prefixLabel"> |
357 | 363 | <Properties> |