Changeset 773 for java/installer2
- Timestamp:
- Apr 1, 2013, 2:13:33 PM (12 years ago)
- Location:
- java/installer2
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/locales/net/oni2/aeinstaller/localization/Downloader_de.properties
r656 r773 1 1 frame.title=AE Installer: Mods herunterladen 2 frame.titleCore=AE Installer: Kernpakete herunterladen 2 3 3 4 btnAbort.title=Abbrechen -
java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r772 r773 54 54 import net.oni2.aeinstaller.backend.packages.PackageManager; 55 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;59 56 import net.oni2.aeinstaller.gui.about.AboutDialog; 60 57 import net.oni2.aeinstaller.gui.corepackages.CorePackagesDialog; … … 357 354 private void doUpdate() { 358 355 if (execUpdates != null && execUpdates.size() > 0) { 359 Downloader dl = new Downloader(execUpdates, null );356 Downloader dl = new Downloader(execUpdates, null, false); 360 357 try { 361 358 dl.setVisible(true); … … 504 501 try { 505 502 ApplicationInvoker.execute(m.getExeType(), 506 m.getWorkingDir(), m.getExeFile(), null, false); 503 m.getWorkingDir(), m.getExeFile(), null, 504 false); 507 505 } catch (ERuntimeNotInstalledException e) { 508 506 JOptionPane.showMessageDialog(null, … … 547 545 } 548 546 549 @ DoInBackground(progressMessage = "checkCorePackages.title", cancelable = false, indeterminateProgress = false)550 private void checkCorePackages( final BackgroundEvent evt) {547 @SuppressWarnings("unused") 548 private void checkCorePackages() { 551 549 if (!SettingsManager.getInstance().isOfflineMode()) { 552 550 for (Package m : PackageManager.getInstance().getCoreTools()) { … … 561 559 } 562 560 if (execCoreUpdates.size() > 0) { 563 ModDownloader m = new ModDownloader(execCoreUpdates, 564 new ModDownloaderListener() { 565 @Override 566 public void updateStatus(ModDownloader source, 567 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 } 581 } 582 } 583 evt.setProgressMessage(bundle.getString("coreToolsInstall.title")); 561 Downloader dl = new Downloader(execCoreUpdates, null, true); 562 try { 563 dl.setVisible(true); 564 } finally { 565 dl.dispose(); 566 } 567 } 584 568 ToolsManager.installTools(PackageManager.getInstance() 585 569 .getCoreTools(), false); … … 626 610 627 611 if (toDownload.size() > 0) { 628 Downloader dl = new Downloader(toDownload, installDeps );612 Downloader dl = new Downloader(toDownload, installDeps, false); 629 613 try { 630 614 dl.setVisible(true); -
java/installer2/src/net/oni2/aeinstaller/gui/downloadwindow/Downloader.java
r648 r773 50 50 * @param dependencies 51 51 * List of mods that only are auto-resolved dependencies 52 * @param isCoreDownload 53 * Downloading core packages - can not be aborted 52 54 */ 53 public Downloader(TreeSet<Package> mods, TreeSet<Package> dependencies) { 55 public Downloader(TreeSet<Package> mods, TreeSet<Package> dependencies, 56 boolean isCoreDownload) { 54 57 super(); 58 59 if (isCoreDownload) { 60 setTitle(bundle.getString("frame.titleCore")); 61 btnAbort.setEnabled(false); 62 } 55 63 56 64 setResizable(false); … … 78 86 @SuppressWarnings("unused") 79 87 private boolean confirm() { 80 int res = JOptionPane.showConfirmDialog(this, 81 bundle.getString("abort.text"), 82 bundle.getString("abort.title"), JOptionPane.YES_NO_OPTION, 83 JOptionPane.WARNING_MESSAGE); 84 return res == JOptionPane.YES_OPTION; 88 if (btnAbort.isEnabled()) { 89 int res = JOptionPane.showConfirmDialog(this, 90 bundle.getString("abort.text"), 91 bundle.getString("abort.title"), JOptionPane.YES_NO_OPTION, 92 JOptionPane.WARNING_MESSAGE); 93 return res == JOptionPane.YES_OPTION; 94 } else 95 return false; 85 96 } 86 97 -
java/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTable.java
r752 r773 346 346 TreeSet<Package> deps = new TreeSet<Package>(); 347 347 toDo.add(mod); 348 Downloader dl = new Downloader(toDo, deps );348 Downloader dl = new Downloader(toDo, deps, false); 349 349 try { 350 350 dl.setVisible(true); -
java/installer2/src/net/oni2/aeinstaller/gui/toolmanager/ToolManager.java
r749 r773 111 111 toDownload.add(selectedPackage); 112 112 113 Downloader dl = new Downloader(toDownload, null );113 Downloader dl = new Downloader(toDownload, null, false); 114 114 try { 115 115 dl.setVisible(true); -
java/installer2/src/net/oni2/aeinstaller/localization/Downloader.properties
r656 r773 1 1 frame.title=AE Installer: Downloading mods 2 frame.titleCore=AE Installer: Downloading core packages 2 3 3 4 btnAbort.title=Abort
Note:
See TracChangeset
for help on using the changeset viewer.