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 641 by alloc, Mon Jan 21 11:14:52 2013 UTC vs.
Revision 643 by alloc, Mon Jan 21 16:23:48 2013 UTC

# Line 524 | Line 524 | public class MainWin extends JFrame impl
524                                          }
525                                  }
526                                  if (depsLocalString.length() == 0)
527 <                                        depsLocalString = bundle.getString("installDependencies.none");
527 >                                        depsLocalString = bundle
528 >                                                        .getString("installDependencies.none");
529                                  if (depsDownloadString.length() == 0)
530 <                                        depsDownloadString = bundle.getString("installDependencies.none");
530 >                                        depsDownloadString = bundle
531 >                                                        .getString("installDependencies.none");
532  
533                                  int res = JOptionPane.showConfirmDialog(this, String.format(
534                                                  bundle.getString("installDependencies.text"),
# Line 540 | Line 542 | public class MainWin extends JFrame impl
542                                          break;
543                                  }
544                          } else {
545 <                                HashMap<Mod, HashSet<Mod>> conflicts = ModManager.getInstance()
545 >                                HashMap<Mod, HashSet<Mod>> incompatibilities = ModManager.getInstance()
546                                                  .checkIncompabitilites(mods);
547 <                                if (conflicts.size() > 0) {
547 >                                if (incompatibilities.size() > 0) {
548                                          installState = EInstallState.INCOMPATIBLE;
549 <                                        System.err.println("Incompatible mods: "
550 <                                                        + conflicts.toString());
551 <                                        // TODO: Message window with incompatibilities
549 >
550 >                                        String incompatString = "";
551 >                                        for (Mod m : incompatibilities.keySet()) {
552 >                                                if (incompatString.length() > 0)
553 >                                                        incompatString += "\n";
554 >                                                incompatString += m.getName() + ": ";
555 >                                                String confMods = "";
556 >                                                for (Mod mConf : incompatibilities.get(m)) {
557 >                                                        if (confMods.length() > 0)
558 >                                                                confMods += ", ";
559 >                                                        confMods += mConf.getName();
560 >                                                }
561 >                                                incompatString += confMods;
562 >                                        }
563 >
564 >                                        JOptionPane.showMessageDialog(this, String.format(
565 >                                                        bundle.getString("installIncompatibilities.text"),
566 >                                                        incompatString), bundle
567 >                                                        .getString("installIncompatibilities.title"),
568 >                                                        JOptionPane.ERROR_MESSAGE);
569                                          break;
570                                  } else {
571                                          installState = EInstallState.READY;

Diff Legend

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