diff options
author | Oleg Besedin | 2008-05-09 21:44:25 +0000 |
---|---|---|
committer | Oleg Besedin | 2008-05-09 21:44:25 +0000 |
commit | e99b4a79cb046d267c961d44addc6014eed49c6b (patch) | |
tree | 9f52d276a807cfb8ad511295e7f69bee75f7dead /bundles/org.eclipse.equinox.security.ui | |
parent | 36d3e63b09099ed55cad4319c404a1d771fa5ceb (diff) | |
download | rt.equinox.bundles-e99b4a79cb046d267c961d44addc6014eed49c6b.tar.gz rt.equinox.bundles-e99b4a79cb046d267c961d44addc6014eed49c6b.tar.xz rt.equinox.bundles-e99b4a79cb046d267c961d44addc6014eed49c6b.zip |
Bug 229796 [sec] Prompt for restart session after deleting storage is confusingv20080509-1800
Diffstat (limited to 'bundles/org.eclipse.equinox.security.ui')
3 files changed, 11 insertions, 6 deletions
diff --git a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/nls/messages.properties b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/nls/messages.properties index 8508ef8a4..a6d057989 100644 --- a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/nls/messages.properties +++ b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/nls/messages.properties @@ -56,7 +56,7 @@ descriptionColumn = Description defaultGroup = Default secure preferences confirmDeleteMsg = This action will delete default secure storage. All data in it will be lost. Are you sure you want to delete it? postDeleteTitle = Storage deleted -postDeleteMsg = Storage deleted. It is highly recommended to restart this session. +postDeleteMsg = Secure storage deleted. Would you like to restart the application now? tabPassword = Password tabAdvanced = Advanced tabContents = Contents diff --git a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java index b886afe1f..d13816872 100644 --- a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java +++ b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/TabContents.java @@ -28,6 +28,7 @@ import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.*; +import org.eclipse.ui.PlatformUI; public class TabContents implements ISecurePreferencesSelection, IDeleteListener { @@ -198,10 +199,12 @@ public class TabContents implements ISecurePreferencesSelection, IDeleteListener InternalExchangeUtils.defaultStorageDelete(); // suggest restart in case somebody holds on to the deleted storage - MessageBox postDeletionBox = new MessageBox(shell, SWT.OK); - postDeletionBox.setText(SecUIMessages.postDeleteTitle); + MessageBox postDeletionBox = new MessageBox(shell, SWT.YES | SWT.NO); + postDeletionBox.setText(SecUIMessages.generalDialogTitle); postDeletionBox.setMessage(SecUIMessages.postDeleteMsg); - postDeletionBox.open(); + int result = postDeletionBox.open(); + if (result == SWT.YES) + PlatformUI.getWorkbench().restart(); } } diff --git a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/view/NodesView.java b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/view/NodesView.java index 2cb918125..593ac7959 100644 --- a/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/view/NodesView.java +++ b/bundles/org.eclipse.equinox.security.ui/src/org/eclipse/equinox/internal/security/ui/storage/view/NodesView.java @@ -233,7 +233,9 @@ public class NodesView { } public void postDeleted() { - if (contentProvider != null) - contentProvider.inputChanged(null, null, defaultPrefs); + if (contentProvider == null) + return; + nodeTreeViewer.setSelection(StructuredSelection.EMPTY); + nodeTreeViewer.refresh(); } } |