--- a/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/swing/App.java Fri Sep 11 17:39:42 2009 -0700
+++ b/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/swing/App.java Tue Sep 15 17:46:37 2009 -0400
@@ -408,7 +408,7 @@
synchronized (instances) {
for (int i = instances.size() - 1; i >= 0; i--) {
// Throws ActionAbortedException
- instances.get(i).closeInstance();
+ instances.get(i).closeInstance(false);
}
}
exit();
--- a/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/swing/AppInstance.java Fri Sep 11 17:39:42 2009 -0700
+++ b/usr/src/java/vpanels/client/org/opensolaris/os/vp/client/swing/AppInstance.java Tue Sep 15 17:46:37 2009 -0400
@@ -155,7 +155,7 @@
@Override
public void run() {
try {
- closeInstance();
+ closeInstance(false);
} catch (ActionAbortedException ignore) {
}
}
@@ -186,14 +186,14 @@
}
@Override
- public void closeInstance() throws ActionAbortedException {
+ public void closeInstance(boolean isCancel) throws ActionAbortedException {
if (loginPane.isShowing()) {
throw new ActionAbortedException();
}
try {
// Unwind navigation stack to force user to handle pending changes
- navigator.goToAsyncAndWait(false, null);
+ navigator.goToAsyncAndWait(isCancel, null);
} catch (NavigationAbortedException e) {
throw new ActionAbortedException(e);
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/common/ClientContext.java Fri Sep 11 17:39:42 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/common/ClientContext.java Tue Sep 15 17:46:37 2009 -0400
@@ -43,10 +43,14 @@
* Closes this instance of the client, subject to arbitrary conditions.
* Note that this may not necessarily close all instances, or stop the JVM.
*
+ * @param isCancel
+ * {@code true} if this instance is being stopped as part
+ * of a {@code cancel} operation, {@code false} otherwise
+ *
* @exception ActionAbortedException
* if the close operation could not or should not complete
*/
- void closeInstance() throws ActionAbortedException;
+ void closeInstance(boolean isCancel) throws ActionAbortedException;
/**
* Creates a new instance of the client, using the same connection.
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/common/control/Control.java Fri Sep 11 17:39:42 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/common/control/Control.java Tue Sep 15 17:46:37 2009 -0400
@@ -468,8 +468,8 @@
* Navigator} and removes any set parameters.
*
* @param isCancel
- * {@code true} if this {@code Control} is being stopped a part
- * of a {@code cancel} operation, false otherwise
+ * {@code true} if this {@code Control} is being stopped as
+ * part of a {@code cancel} operation, {@code false} otherwise
*
* @exception NavigationAbortedException
* if this {@code Control} should remain the current {@code
--- a/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/SwingSettingsControl.java Fri Sep 11 17:39:42 2009 -0700
+++ b/usr/src/java/vpanels/panel/org/opensolaris/os/vp/panel/swing/control/SwingSettingsControl.java Tue Sep 15 17:46:37 2009 -0400
@@ -193,16 +193,7 @@
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
- getNavigator().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- try {
- getClientContext().closeInstance();
- } catch (ActionAbortedException ignore) {
- }
- }
- });
+ doQuit();
}
});
}
@@ -232,7 +223,7 @@
@Override
public void run() {
try {
- getClientContext().closeInstance();
+ getClientContext().closeInstance(true);
} catch (ActionException ignore) {
}
}
@@ -251,7 +242,7 @@
public void run() {
try {
saveAction.invoke();
- getClientContext().closeInstance();
+ getClientContext().closeInstance(false);
} catch (ActionException ignore) {
}
}