Changeset 807 for java


Ignore:
Timestamp:
Apr 12, 2013, 6:33:10 PM (12 years ago)
Author:
alloc
Message:

AEI2.02:

Location:
java/installer2
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • java/installer2/locales/net/oni2/aeinstaller/localization/MainWin_de.properties

    r806 r807  
    2323menu.saveConfig=&Speichere die aktuelle Mod-Auswahl...
    2424menu.saveConfigTooltip=Speichere die aktuelle Mod-Auswahl in eine Datei
     25menu.copyConfig=&Kopiere aktuell installierte Mods in die Zwischenablage
     26menu.copyConfigTooltip=Kopiert die aktuell installierten Mods in die Zwischenablage zum Posten im OCF
    2527
    2628menu.corePackages=&Zeige Kernpakete
  • java/installer2/src/net/oni2/aeinstaller/Images.properties

    r806 r807  
    66img.refresh=/net/oni2/aeinstaller/images/tango/view-refresh.png
    77
     8img.copy=/net/oni2/aeinstaller/images/open_icon_library/edit-copy-9.png
    89img.help=/net/oni2/aeinstaller/images/open_icon_library/help-3.png
    910img.stop=/net/oni2/aeinstaller/images/open_icon_library/media-playback-stop-7.png
  • java/installer2/src/net/oni2/aeinstaller/backend/packages/PackageManager.java

    r804 r807  
    215215
    216216        /**
     217         * @return Currently installed mods
     218         */
     219        public TreeSet<Package> getInstalledMods() {
     220                TreeSet<Package> res = new TreeSet<Package>();
     221                for (int n : Installer.getInstalledMods()) {
     222                        res.add(getPackageByNumber(n));
     223                }
     224                return res;
     225        }
     226
     227        /**
    217228         * @return Collection of tools valid on this platform and not core
    218229         */
  • java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java

    r806 r807  
    44import java.awt.Desktop;
    55import java.awt.GridLayout;
     6import java.awt.Toolkit;
     7import java.awt.datatransfer.Clipboard;
     8import java.awt.datatransfer.StringSelection;
    69import java.awt.event.ActionEvent;
    710import java.awt.event.ItemEvent;
     
    406409                new AboutDialog().setVisible(true);
    407410        }
    408        
     411
    409412        @SuppressWarnings("unused")
    410413        private void showHelp() {
     
    463466                                        tblMods.getSelectedMods());
    464467                }
     468        }
     469
     470        @SuppressWarnings("unused")
     471        private void copyConfig() {
     472                StringBuffer b = new StringBuffer();
     473                b.append("[code]");
     474                for (Package p : PackageManager.getInstance().getInstalledMods())
     475                        b.append(String.format("%s %s%n", p.getPackageNumberString(),
     476                                        p.getName()));
     477                b.append("[/code]");
     478               
     479                StringSelection selection = new StringSelection(b.toString());
     480            Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
     481            clipboard.setContents(selection, selection);
    465482        }
    466483
     
    809826                pkgInfo.updateInfo(m);
    810827        }
    811        
     828
    812829        @SuppressWarnings("unused")
    813830        private void clearFilter() {
  • java/installer2/src/net/oni2/aeinstaller/gui/MainWin.yml

    r806 r807  
    1919    - Action(name=loadConfig, text=menu.loadConfig, toolTipText=menu.loadConfigTooltip, icon=img.openFile, onAction=[loadConfig])
    2020    - Action(name=saveConfig, text=menu.saveConfig, toolTipText=menu.saveConfigTooltip, icon=img.saveFile, onAction=[saveConfig])
     21    - Action(name=copyConfig, text=menu.copyConfig, toolTipText=menu.copyConfigTooltip, icon=img.copy, onAction=[copyConfig])
    2122    - Action(name=reglobalize, text=menu.reglobalize, toolTipText=menu.reglobalizeTooltip, icon=img.refresh, onAction=[reglobalizeVerify,reglobalize])
    2223    - Action(name=tools, text=menu.manageTools, toolTipText=menu.manageToolsTooltip, icon=img.tools, onAction=[tools,refreshToolsMenu])
     
    3435            - JMenuItem(action=loadConfig)
    3536            - JMenuItem(action=saveConfig)
     37            - JMenuItem(action=copyConfig)
    3638            - JSeparator()
    3739            - JMenuItem(action=openEditionFolder)
  • java/installer2/src/net/oni2/aeinstaller/localization/MainWin.properties

    r806 r807  
    2323menu.saveConfig=&Save current mod selection...
    2424menu.saveConfigTooltip=Save current mod selection to a file
     25menu.copyConfig=&Copy currently installed mods to clipboard
     26menu.copyConfigTooltip=Copies the currently installed mods to clipboard in format for posting on OCF
    2527
    2628menu.corePackages=&Show core packages
Note: See TracChangeset for help on using the changeset viewer.