X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Tools%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FFirstPanel.java;h=7241c1b331afd2644bdfe151da0ef0221570e422;hb=821709bd1b37f1a61fe5c998530083665eb2c854;hp=b933dac0ea79d6506a98b197573d237980214aac;hpb=050e979f683e64d9d747a9ea49bb3deee0dd9ae5;p=mirror_edk2.git diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java index b933dac0ea..7241c1b331 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/FirstPanel.java @@ -73,6 +73,7 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList defaultpathbox = new JCheckBox("Use Default Output Path", true); defaultpathbox.addItemListener(this); + ModuleInfo.defaultoutput = true; JPanel modulePanel = new JPanel(); modulePanel.add(moduleButton); @@ -114,8 +115,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList add(logScrollPane); fc = new JFileChooser(); - fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); - } + fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); + } //---------------------------------------------------------------------------------------// @@ -157,7 +158,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList //---------------------------------------------------------------------------------------// - public String getFilepath() { + public String getFilepath(String title) { + fc.setDialogTitle(title); if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { log.append(fc.getSelectedFile().getAbsolutePath() + "\n"); return fc.getSelectedFile().getAbsolutePath(); @@ -169,7 +171,8 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList public void actionPerformed(ActionEvent e) { if ( e.getSource() == moduleButton ) { - modulepath = getFilepath(); + modulepath = getFilepath("Please choose a starting path"); + moduletext.setText(modulepath); } if ( e.getSource() == goButton ) { try { @@ -218,16 +221,14 @@ public final class FirstPanel extends JPanel implements ActionListener, ItemList } else if (e.getSource() == criticbox) { if (e.getStateChange() == ItemEvent.DESELECTED) { ModuleInfo.doCritic = false; - System.out.println("criticbox DESELECTED"); } else if (e.getStateChange() == ItemEvent.SELECTED) { ModuleInfo.doCritic = true; - System.out.println("criticbox SELECTED"); } } else if (e.getSource() == defaultpathbox) { if (e.getStateChange() == ItemEvent.DESELECTED) { - System.out.println("defaultpathbox DESELECTED"); + ModuleInfo.defaultoutput = false; } else if (e.getStateChange() == ItemEvent.SELECTED) { - System.out.println("defaultpathbox SELECTED"); + ModuleInfo.defaultoutput = true; } } }