ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
(Generate patch)

Comparing AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java (file contents):
Revision 625 by alloc, Wed Jan 16 16:12:24 2013 UTC vs.
Revision 627 by alloc, Thu Jan 17 23:23:44 2013 UTC

# Line 1 | Line 1
1   package net.oni2.aeinstaller.gui;
2  
3 + import java.awt.BorderLayout;
4   import java.awt.Desktop;
5   import java.awt.event.ActionEvent;
6   import java.awt.event.ActionListener;
7 + import java.awt.event.ItemEvent;
8 + import java.awt.event.ItemListener;
9   import java.awt.event.MouseAdapter;
10   import java.awt.event.MouseEvent;
11   import java.io.File;
# Line 21 | Line 24 | import javax.swing.AbstractAction;
24   import javax.swing.Icon;
25   import javax.swing.ImageIcon;
26   import javax.swing.JButton;
27 + import javax.swing.JCheckBox;
28   import javax.swing.JComboBox;
29   import javax.swing.JComponent;
30   import javax.swing.JFileChooser;
# Line 29 | Line 33 | import javax.swing.JLabel;
33   import javax.swing.JMenu;
34   import javax.swing.JMenuItem;
35   import javax.swing.JOptionPane;
36 + import javax.swing.JPanel;
37   import javax.swing.JPopupMenu;
38   import javax.swing.JSplitPane;
39   import javax.swing.JTable;
# Line 303 | Line 308 | public class MainWin extends JFrame impl
308                                          strTools += " - " + m.getName();
309                                  }
310                                  if (size > 0) {
311 +                                        // Build info dialog content
312                                          String message = "<html>";
313                                          message += String.format(
314                                                          bundle.getString("updatesAvailable.text"), strMods,
315                                                          strTools, SizeFormatter.format(size, 3));
316                                          message += "</html>";
317 <                                        int res = JOptionPane.showConfirmDialog(this, message,
317 >
318 >                                        JPanel pan = new JPanel();
319 >                                        pan.setLayout(new BorderLayout(0, 20));
320 >                                        JLabel lab = new JLabel(message);
321 >                                        pan.add(lab, BorderLayout.CENTER);
322 >                                        JCheckBox checkFutureUpdates = new JCheckBox(
323 >                                                        bundle.getString("checkOnStartup.text"));
324 >                                        checkFutureUpdates.setSelected(Settings.getInstance().get(
325 >                                                        "notifyupdates", true));
326 >                                        checkFutureUpdates.addItemListener(new ItemListener() {
327 >                                                @Override
328 >                                                public void itemStateChanged(ItemEvent evt) {
329 >                                                        Settings.getInstance().put("notifyupdates",
330 >                                                                        evt.getStateChange() == ItemEvent.SELECTED);
331 >                                                }
332 >                                        });
333 >                                        pan.add(checkFutureUpdates, BorderLayout.SOUTH);
334 >
335 >                                        // Show dialog
336 >                                        int res = JOptionPane.showConfirmDialog(this, pan,
337                                                          bundle.getString("updatesAvailable.title"),
338                                                          JOptionPane.YES_NO_OPTION,
339                                                          JOptionPane.QUESTION_MESSAGE);

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)