mirror of https://github.com/acidanthera/audk.git
1. Fix EDKT441 After some modifications and refresh, there will show a dialog for save all files. The operation of Cancel should not refresh wizard.
2. Fix EDKT442 After some modifications and refresh, there will show a dialog for save all files. The operation of erasing this dialog should be regarded as Cancel, not refresh wizard. 3. Fix EDKT455 The style of menu should be unified 4. Fix EDKT439 After some modifications and exit, there will show a dialog for save all files. The operation of erasing this dialog should be regard as Cancel, not exit wizard. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1851 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
e83a1d9ad3
commit
57046e97fa
|
@ -683,7 +683,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
private JMenuItem getJMenuItemHelpAbout() {
|
private JMenuItem getJMenuItemHelpAbout() {
|
||||||
if (jMenuItemHelpAbout == null) {
|
if (jMenuItemHelpAbout == null) {
|
||||||
jMenuItemHelpAbout = new JMenuItem();
|
jMenuItemHelpAbout = new JMenuItem();
|
||||||
jMenuItemHelpAbout.setText("About...");
|
jMenuItemHelpAbout.setText("About");
|
||||||
jMenuItemHelpAbout.setMnemonic('A');
|
jMenuItemHelpAbout.setMnemonic('A');
|
||||||
jMenuItemHelpAbout.addActionListener(this);
|
jMenuItemHelpAbout.addActionListener(this);
|
||||||
}
|
}
|
||||||
|
@ -1358,7 +1358,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
private JMenuItem getJMenuItemToolsBuildPreferences() {
|
private JMenuItem getJMenuItemToolsBuildPreferences() {
|
||||||
if (jMenuItemToolsBuildPreferences == null) {
|
if (jMenuItemToolsBuildPreferences == null) {
|
||||||
jMenuItemToolsBuildPreferences = new JMenuItem();
|
jMenuItemToolsBuildPreferences = new JMenuItem();
|
||||||
jMenuItemToolsBuildPreferences.setText("Build Preferences");
|
jMenuItemToolsBuildPreferences.setText("Build Preferences...");
|
||||||
jMenuItemToolsBuildPreferences.setMnemonic('P');
|
jMenuItemToolsBuildPreferences.setMnemonic('P');
|
||||||
jMenuItemToolsBuildPreferences.setEnabled(true);
|
jMenuItemToolsBuildPreferences.setEnabled(true);
|
||||||
jMenuItemToolsBuildPreferences.addActionListener(this);
|
jMenuItemToolsBuildPreferences.addActionListener(this);
|
||||||
|
@ -1598,7 +1598,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
private JMenuItem getJMenuItemProjectInstallFar() {
|
private JMenuItem getJMenuItemProjectInstallFar() {
|
||||||
if (jMenuItemProjectInstallFar == null) {
|
if (jMenuItemProjectInstallFar == null) {
|
||||||
jMenuItemProjectInstallFar = new JMenuItem();
|
jMenuItemProjectInstallFar = new JMenuItem();
|
||||||
jMenuItemProjectInstallFar.setText("Install FAR");
|
jMenuItemProjectInstallFar.setText("Install FAR...");
|
||||||
jMenuItemProjectInstallFar.setMnemonic('I');
|
jMenuItemProjectInstallFar.setMnemonic('I');
|
||||||
jMenuItemProjectInstallFar.setEnabled(true);
|
jMenuItemProjectInstallFar.setEnabled(true);
|
||||||
jMenuItemProjectInstallFar.addActionListener(this);
|
jMenuItemProjectInstallFar.addActionListener(this);
|
||||||
|
@ -1614,7 +1614,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
private JMenuItem getJMenuItemProjectUpdateFar() {
|
private JMenuItem getJMenuItemProjectUpdateFar() {
|
||||||
if (jMenuItemProjectUpdateFar == null) {
|
if (jMenuItemProjectUpdateFar == null) {
|
||||||
jMenuItemProjectUpdateFar = new JMenuItem();
|
jMenuItemProjectUpdateFar = new JMenuItem();
|
||||||
jMenuItemProjectUpdateFar.setText("Update FAR");
|
jMenuItemProjectUpdateFar.setText("Update FAR...");
|
||||||
jMenuItemProjectUpdateFar.setMnemonic('U');
|
jMenuItemProjectUpdateFar.setMnemonic('U');
|
||||||
jMenuItemProjectUpdateFar.setEnabled(true);
|
jMenuItemProjectUpdateFar.setEnabled(true);
|
||||||
jMenuItemProjectUpdateFar.addActionListener(this);
|
jMenuItemProjectUpdateFar.addActionListener(this);
|
||||||
|
@ -1631,7 +1631,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
private JMenuItem getJMenuItemProjectRemoveFar() {
|
private JMenuItem getJMenuItemProjectRemoveFar() {
|
||||||
if (jMenuItemProjectRemoveFar == null) {
|
if (jMenuItemProjectRemoveFar == null) {
|
||||||
jMenuItemProjectRemoveFar = new JMenuItem();
|
jMenuItemProjectRemoveFar = new JMenuItem();
|
||||||
jMenuItemProjectRemoveFar.setText("Remove FAR");
|
jMenuItemProjectRemoveFar.setText("Remove FAR...");
|
||||||
jMenuItemProjectRemoveFar.setMnemonic('R');
|
jMenuItemProjectRemoveFar.setMnemonic('R');
|
||||||
jMenuItemProjectRemoveFar.setEnabled(true);
|
jMenuItemProjectRemoveFar.setEnabled(true);
|
||||||
jMenuItemProjectRemoveFar.addActionListener(this);
|
jMenuItemProjectRemoveFar.addActionListener(this);
|
||||||
|
@ -1647,7 +1647,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
private JMenuItem getJMenuItemProjectCreateFar() {
|
private JMenuItem getJMenuItemProjectCreateFar() {
|
||||||
if (jMenuItemProjectCreateFar == null) {
|
if (jMenuItemProjectCreateFar == null) {
|
||||||
jMenuItemProjectCreateFar = new JMenuItem();
|
jMenuItemProjectCreateFar = new JMenuItem();
|
||||||
jMenuItemProjectCreateFar.setText("Create FAR");
|
jMenuItemProjectCreateFar.setText("Create FAR...");
|
||||||
jMenuItemProjectCreateFar.setMnemonic('C');
|
jMenuItemProjectCreateFar.setMnemonic('C');
|
||||||
jMenuItemProjectCreateFar.addActionListener(this);
|
jMenuItemProjectCreateFar.addActionListener(this);
|
||||||
}
|
}
|
||||||
|
@ -1774,7 +1774,7 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
private JMenuItem getJMenuItemToolsGenerateGuidsXref() {
|
private JMenuItem getJMenuItemToolsGenerateGuidsXref() {
|
||||||
if (jMenuItemToolsGenerateGuidsXref == null) {
|
if (jMenuItemToolsGenerateGuidsXref == null) {
|
||||||
jMenuItemToolsGenerateGuidsXref = new JMenuItem();
|
jMenuItemToolsGenerateGuidsXref = new JMenuItem();
|
||||||
jMenuItemToolsGenerateGuidsXref.setText("Generate guids.xref");
|
jMenuItemToolsGenerateGuidsXref.setText("Generate guids.xref...");
|
||||||
jMenuItemToolsGenerateGuidsXref.setMnemonic('G');
|
jMenuItemToolsGenerateGuidsXref.setMnemonic('G');
|
||||||
jMenuItemToolsGenerateGuidsXref.addActionListener(this);
|
jMenuItemToolsGenerateGuidsXref.addActionListener(this);
|
||||||
}
|
}
|
||||||
|
@ -1903,9 +1903,10 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg0.getSource() == this.jMenuItemFileRefresh) {
|
if (arg0.getSource() == this.jMenuItemFileRefresh) {
|
||||||
this.closeAll();
|
if (this.closeAll() == 0) {
|
||||||
this.refresh();
|
this.refresh();
|
||||||
this.makeEmptyTree();
|
this.makeEmptyTree();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg0.getSource() == this.jMenuItemFileExit) {
|
if (arg0.getSource() == this.jMenuItemFileExit) {
|
||||||
|
@ -3189,8 +3190,8 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
Close all opening files and clean all showing internal frame
|
Close all opening files and clean all showing internal frame
|
||||||
|
|
||||||
**/
|
**/
|
||||||
private void closeAll() {
|
private int closeAll() {
|
||||||
int result = -1;
|
int result = JOptionPane.NO_OPTION;
|
||||||
if (!GlobalData.openingModuleList.isSaved() || !GlobalData.openingPackageList.isSaved()
|
if (!GlobalData.openingModuleList.isSaved() || !GlobalData.openingPackageList.isSaved()
|
||||||
|| !GlobalData.openingPlatformList.isSaved()) {
|
|| !GlobalData.openingPlatformList.isSaved()) {
|
||||||
result = showSaveDialog();
|
result = showSaveDialog();
|
||||||
|
@ -3203,13 +3204,15 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
// Do nothing
|
// Do nothing
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
if (result == JOptionPane.CANCEL_OPTION) {
|
if (result == JOptionPane.CANCEL_OPTION || result == JOptionPane.CLOSED_OPTION) {
|
||||||
return;
|
return -1;
|
||||||
}
|
}
|
||||||
this.cleanDesktopPane();
|
this.cleanDesktopPane();
|
||||||
GlobalData.openingModuleList.closeAll();
|
GlobalData.openingModuleList.closeAll();
|
||||||
GlobalData.openingPackageList.closeAll();
|
GlobalData.openingPackageList.closeAll();
|
||||||
GlobalData.openingPlatformList.closeAll();
|
GlobalData.openingPlatformList.closeAll();
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3282,18 +3285,16 @@ public class FrameworkWizardUI extends IFrame implements KeyListener, MouseListe
|
||||||
|
|
||||||
**/
|
**/
|
||||||
private void exit() {
|
private void exit() {
|
||||||
int result = -1;
|
int result = JOptionPane.NO_OPTION;
|
||||||
if (!GlobalData.openingModuleList.isSaved() || !GlobalData.openingPackageList.isSaved()
|
if (!GlobalData.openingModuleList.isSaved() || !GlobalData.openingPackageList.isSaved()
|
||||||
|| !GlobalData.openingPlatformList.isSaved()) {
|
|| !GlobalData.openingPlatformList.isSaved()) {
|
||||||
result = showSaveDialog();
|
result = showSaveDialog();
|
||||||
}
|
}
|
||||||
if (result == JOptionPane.YES_OPTION) {
|
if (result == JOptionPane.YES_OPTION) {
|
||||||
this.saveAll();
|
this.saveAll();
|
||||||
}
|
} else if (result == JOptionPane.NO_OPTION) {
|
||||||
if (result == JOptionPane.NO_OPTION) {
|
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
} else if (result == JOptionPane.CANCEL_OPTION || result == JOptionPane.CLOSED_OPTION) {
|
||||||
if (result == JOptionPane.CANCEL_OPTION) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.dispose();
|
this.dispose();
|
||||||
|
|
Loading…
Reference in New Issue