Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java
index 36b075a693..14475ac132 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/branch/BranchOperationUI.java
@@ -375,13 +375,20 @@ public class BranchOperationUI {
if (store.getBoolean(UIPreferences.SHOW_DETACHED_HEAD_WARNING)) {
String toggleMessage = UIText.BranchResultDialog_DetachedHeadWarningDontShowAgain;
- MessageDialogWithToggle.openInformation(PlatformUI
- .getWorkbench().getActiveWorkbenchWindow()
- .getShell(),
- UIText.BranchOperationUI_DetachedHeadTitle,
+
+ MessageDialogWithToggle dialog = new MessageDialogWithToggle(
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getShell(),
+ UIText.BranchOperationUI_DetachedHeadTitle, null,
UIText.BranchOperationUI_DetachedHeadMessage,
- toggleMessage, false, store,
- UIPreferences.SHOW_DETACHED_HEAD_WARNING);
+ MessageDialog.INFORMATION,
+ new String[] { IDialogConstants.CLOSE_LABEL },
+ 0, toggleMessage, false);
+ dialog.open();
+ if (dialog.getToggleState()) {
+ store.setValue(UIPreferences.SHOW_DETACHED_HEAD_WARNING,
+ false);
+ }
}
}
});

Back to the top