Changeset 645 for AE/installer2/src/net/oni2/aeinstaller/gui
- Timestamp:
- Jan 22, 2013, 10:24:47 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/gui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r643 r645 103 103 private JButton btnInstall; 104 104 105 private TreeSet<Mod> execMandatoryUpdates = new TreeSet<Mod>(); 105 106 private TreeSet<Mod> execUpdates = null; 106 107 … … 307 308 308 309 } 310 311 @SuppressWarnings("unused") 312 private void showMandatoryPackagesDialog() { 313 // TODO: open mand-pack-dialog 314 } 309 315 310 316 private void showSettings() { … … 433 439 private void checkMandatoryFiles(final BackgroundEvent evt) { 434 440 if (!Settings.getInstance().isOfflineMode()) { 435 TreeSet<Mod> mand = new TreeSet<Mod>();436 441 for (Mod m : ModManager.getInstance().getMandatoryTools()) { 437 442 if (m.isNewerAvailable()) { 438 mand.add(m);443 execMandatoryUpdates.add(m); 439 444 } 440 445 } 441 446 for (Mod m : ModManager.getInstance().getMandatoryMods()) { 442 447 if (m.isNewerAvailable()) { 443 mand.add(m);444 } 445 } 446 if ( mand.size() > 0) {447 ModDownloader m = new ModDownloader( mand,448 execMandatoryUpdates.add(m); 449 } 450 } 451 if (execMandatoryUpdates.size() > 0) { 452 ModDownloader m = new ModDownloader(execMandatoryUpdates, 448 453 new ModDownloaderListener() { 449 454 @Override … … 468 473 Installer 469 474 .installTools(ModManager.getInstance().getMandatoryTools()); 475 } 476 } 477 478 @SuppressWarnings("unused") 479 private void infoMandatoryFiles() { 480 if (execMandatoryUpdates.size() > 0) { 481 String packages = ""; 482 for (Mod m : execMandatoryUpdates) { 483 packages += String.format("\n - %s (%s)", m.getName(), 484 m.getVersion()); 485 } 486 JOptionPane.showMessageDialog(this, String.format( 487 bundle.getString("mandatoryFilesUpdated.text"), packages), 488 bundle.getString("mandatoryFilesUpdated.title"), 489 JOptionPane.INFORMATION_MESSAGE); 470 490 } 471 491 } … … 543 563 } 544 564 } else { 545 HashMap<Mod, HashSet<Mod>> incompatibilities = ModManager .getInstance()546 . checkIncompabitilites(mods);565 HashMap<Mod, HashSet<Mod>> incompatibilities = ModManager 566 .getInstance().checkIncompabitilites(mods); 547 567 if (incompatibilities.size() > 0) { 548 568 installState = EInstallState.INCOMPATIBLE; -
AE/installer2/src/net/oni2/aeinstaller/gui/MainWin.yml
r641 r645 6 6 locationRelativeTo: null 7 7 defaultCloseOperation: doNothingOnClose 8 onWindowOpened: [execDepotUpdate,checkMandatoryFiles, checkInitialize,initialize,checkUpdates,doUpdate,refreshToolsMenu,focus]8 onWindowOpened: [execDepotUpdate,checkMandatoryFiles,infoMandatoryFiles,checkInitialize,initialize,checkUpdates,doUpdate,refreshToolsMenu,focus] 9 9 onWindowClosing: [saveLocalData,exit] 10 10 iconImage: img.ae … … 21 21 - Action(name=tools, text=menu.manageTools, toolTipText=menu.manageToolsTooltip, icon=img.tools, onAction=[tools,refreshToolsMenu]) 22 22 - Action(name=update, text=menu.update, toolTipText=menu.updateTooltip, icon=img.update, onAction=[checkUpdates,doUpdate]) 23 - Action(name=mandatoryPackages, text=menu.mandatoryPackages, toolTipText=menu.mandatoryPackagesTooltip, icon=img.mandatory, onAction=[showMandatoryPackagesDialog]) 23 24 - JMenuBar: 24 25 - JMenu(name=mainMenu, text=menu.main): … … 30 31 - JMenuItem(action=runOniWin) 31 32 - JSeparator() 32 - JMenuItem(action= openEditionFolder)33 - JMenuItem(action=update) 33 34 - JSeparator() 34 35 - JMenuItem(action=loadConfig) 35 36 - JMenuItem(action=saveConfig) 36 37 - JSeparator() 38 - JMenuItem(action=openEditionFolder) 39 - JSeparator() 40 - JMenuItem(action=mandatoryPackages) 37 41 - JMenuItem(action=reglobalize) 38 - JSeparator()39 - JMenuItem(action=update)40 42 - JMenu(name=toolsMenu, text=menu.tools): 41 43 - JMenuItem(name=manageToolsItem, action=tools) -
AE/installer2/src/net/oni2/aeinstaller/gui/about/AboutDialog.properties
r593 r645 9 9 10 10 panLinks=Links: 11 Links=<a href="http://oni.bungie.org/ ">Oni Community Portal</a> (oni.bungie.org)<br><a href="http://mods.oni2.net/">Oni Mod Depot</a> (mods.oni2.net)<br><a href="http://wiki.oni2.net/">Oni Galore Wiki</a> (wiki.oni2.net)11 Links=<a href="http://oni.bungie.org/community/forum/index.php">Oni Central Forum</a> (oni.bungie.org/community/forum)<br><a href="http://oni.bungie.org/">Oni Community Portal</a> (oni.bungie.org)<br><a href="http://mods.oni2.net/">Oni Mod Depot</a> (mods.oni2.net)<br><a href="http://wiki.oni2.net/">Oni Galore Wiki</a> (wiki.oni2.net) -
AE/installer2/src/net/oni2/aeinstaller/gui/modtable/ModTable.java
r639 r645 26 26 import javax.swing.SortOrder; 27 27 import javax.swing.event.ListSelectionEvent; 28 import javax.swing.event.RowSorterEvent; 28 29 import javax.swing.table.TableRowSorter; 29 30 31 import net.oni2.aeinstaller.backend.Settings; 30 32 import net.oni2.aeinstaller.backend.mods.Mod; 31 33 import net.oni2.aeinstaller.backend.mods.Type; … … 68 70 69 71 List<RowSorter.SortKey> sortKeys = new ArrayList<RowSorter.SortKey>(); 70 sortKeys.add(new RowSorter.SortKey(1, SortOrder.ASCENDING)); 72 73 int sortCol = Settings.getInstance().get("modSortColumn", 1); 74 SortOrder sortOrder = SortOrder.valueOf(Settings.getInstance().get( 75 "modSortOrder", "ASCENDING")); 76 77 sortKeys.add(new RowSorter.SortKey(sortCol, sortOrder)); 71 78 sorter.setSortKeys(sortKeys); 72 79 … … 180 187 public void setFilter(Type type, int downloadState) { 181 188 sorter.setRowFilter(new ModTableFilter(type, downloadState)); 189 } 190 191 @Override 192 public void sorterChanged(RowSorterEvent evt) { 193 super.sorterChanged(evt); 194 if (evt.getType() == RowSorterEvent.Type.SORT_ORDER_CHANGED) { 195 @SuppressWarnings("unchecked") 196 RowSorter<ModTableModel> rs = (RowSorter<ModTableModel>) getRowSorter(); 197 List<? extends RowSorter.SortKey> keys = rs.getSortKeys(); 198 if (keys.size() > 0) { 199 int col = keys.get(0).getColumn(); 200 SortOrder so = keys.get(0).getSortOrder(); 201 Settings.getInstance().put("modSortColumn", col); 202 Settings.getInstance().put("modSortOrder", so.toString()); 203 } 204 } 182 205 } 183 206 … … 273 296 setRowSelectionInterval(i, i); 274 297 JViewport viewport = (JViewport) getParent(); 275 Rectangle rect = getCellRect(i, 0, 276 true); 298 Rectangle rect = getCellRect(i, 0, true); 277 299 Rectangle r2 = viewport.getVisibleRect(); 278 300 scrollRectToVisible(new Rectangle(rect.x, rect.y,
Note:
See TracChangeset
for help on using the changeset viewer.