Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Weiser2017-08-01 10:48:27 +0000
committerThomas Wolf2017-08-07 10:29:25 +0000
commit7bd43750ccd792743e2567930baf2705629af17a (patch)
treee90a07d43f2b83f517b86a514458d35464230b9b
parent6e2aa3ac99281cee6afe13ff821370b2daef691c (diff)
downloadegit-7bd43750ccd792743e2567930baf2705629af17a.tar.gz
egit-7bd43750ccd792743e2567930baf2705629af17a.tar.xz
egit-7bd43750ccd792743e2567930baf2705629af17a.zip
Detached HEAD dialog should use verbs (close) instead of OK
* uses constructor of MessageDialogWithToggle to set close button label Bug: 518506 Change-Id: I3b37e084339ba52d843a038c1f4f9ce9ddb6d9f4 Signed-off-by: David Weiser <david.weiser@vogella.com>
-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