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

Comparing java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java (file contents):
Revision 772 by alloc, Mon Apr 1 00:12:20 2013 UTC vs.
Revision 773 by alloc, Mon Apr 1 12:13:33 2013 UTC

# Line 53 | Line 53 | import net.oni2.aeinstaller.backend.oni.
53   import net.oni2.aeinstaller.backend.packages.Package;
54   import net.oni2.aeinstaller.backend.packages.PackageManager;
55   import net.oni2.aeinstaller.backend.packages.Type;
56 import net.oni2.aeinstaller.backend.packages.download.ModDownloader;
57 import net.oni2.aeinstaller.backend.packages.download.ModDownloader.State;
58 import net.oni2.aeinstaller.backend.packages.download.ModDownloaderListener;
56   import net.oni2.aeinstaller.gui.about.AboutDialog;
57   import net.oni2.aeinstaller.gui.corepackages.CorePackagesDialog;
58   import net.oni2.aeinstaller.gui.downloadwindow.Downloader;
# Line 356 | Line 353 | public class MainWin extends JFrame impl
353          @SuppressWarnings("unused")
354          private void doUpdate() {
355                  if (execUpdates != null && execUpdates.size() > 0) {
356 <                        Downloader dl = new Downloader(execUpdates, null);
356 >                        Downloader dl = new Downloader(execUpdates, null, false);
357                          try {
358                                  dl.setVisible(true);
359                                  if (dl.isFinished()) {
# Line 503 | Line 500 | public class MainWin extends JFrame impl
500                                          public void actionPerformed(ActionEvent evt) {
501                                                  try {
502                                                          ApplicationInvoker.execute(m.getExeType(),
503 <                                                                        m.getWorkingDir(), m.getExeFile(), null, false);
503 >                                                                        m.getWorkingDir(), m.getExeFile(), null,
504 >                                                                        false);
505                                                  } catch (ERuntimeNotInstalledException e) {
506                                                          JOptionPane.showMessageDialog(null,
507                                                                          bundle.getString("exeNotFound.text"),
# Line 546 | Line 544 | public class MainWin extends JFrame impl
544                  tblMods.unSelectAll();
545          }
546  
547 <        @DoInBackground(progressMessage = "checkCorePackages.title", cancelable = false, indeterminateProgress = false)
548 <        private void checkCorePackages(final BackgroundEvent evt) {
547 >        @SuppressWarnings("unused")
548 >        private void checkCorePackages() {
549                  if (!SettingsManager.getInstance().isOfflineMode()) {
550                          for (Package m : PackageManager.getInstance().getCoreTools()) {
551                                  if (m.isNewerAvailable()) {
# Line 560 | Line 558 | public class MainWin extends JFrame impl
558                                  }
559                          }
560                          if (execCoreUpdates.size() > 0) {
561 <                                ModDownloader m = new ModDownloader(execCoreUpdates,
562 <                                                new ModDownloaderListener() {
563 <                                                        @Override
564 <                                                        public void updateStatus(ModDownloader source,
565 <                                                                        Package currentDownload, State state,
568 <                                                                        int filesDown, int filesTotal,
569 <                                                                        int bytesDown, int bytesTotal,
570 <                                                                        int duration, int remaining, int speed) {
571 <                                                                evt.setProgressEnd(filesTotal);
572 <                                                                evt.setProgressValue(filesDown);
573 <                                                        }
574 <                                                });
575 <                                while (!m.isFinished()) {
576 <                                        try {
577 <                                                Thread.sleep(10);
578 <                                        } catch (InterruptedException e) {
579 <                                                e.printStackTrace();
580 <                                        }
561 >                                Downloader dl = new Downloader(execCoreUpdates, null, true);
562 >                                try {
563 >                                        dl.setVisible(true);
564 >                                } finally {
565 >                                        dl.dispose();
566                                  }
567                          }
583                        evt.setProgressMessage(bundle.getString("coreToolsInstall.title"));
568                          ToolsManager.installTools(PackageManager.getInstance()
569                                          .getCoreTools(), false);
570                  }
# Line 625 | Line 609 | public class MainWin extends JFrame impl
609                          }
610  
611                          if (toDownload.size() > 0) {
612 <                                Downloader dl = new Downloader(toDownload, installDeps);
612 >                                Downloader dl = new Downloader(toDownload, installDeps, false);
613                                  try {
614                                          dl.setVisible(true);
615                                          if (!dl.isFinished()) {

Diff Legend

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