From 03f841f79a3087b0b368bb657e812de5fe944404 Mon Sep 17 00:00:00 2001 From: Dmitriy Smirnov Date: Wed, 5 Jul 2017 20:47:35 +0300 Subject: [PATCH] IDEA-174999 Improve wording in the Line Separators Warning dialog - Remove Read more link - Improve description of actions - Adjust font size --- plugins/git4idea/src/git4idea/crlf/GitCrlfDialog.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/git4idea/src/git4idea/crlf/GitCrlfDialog.java b/plugins/git4idea/src/git4idea/crlf/GitCrlfDialog.java index 1bc1f57badab..bcb889dc5ea9 100644 --- a/plugins/git4idea/src/git4idea/crlf/GitCrlfDialog.java +++ b/plugins/git4idea/src/git4idea/crlf/GitCrlfDialog.java @@ -15,12 +15,10 @@ */ package git4idea.crlf; -import com.intellij.ide.BrowserUtil; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.ui.components.JBCheckBox; import com.intellij.ui.components.JBLabel; -import com.intellij.ui.components.labels.LinkLabel; import com.intellij.util.ui.GridBag; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; @@ -68,14 +66,13 @@ public class GitCrlfDialog extends DialogWrapper { protected JComponent createCenterPanel() { JLabel description = new JBLabel( "You are about to commit CRLF line separators to the Git repository.
" + - "It is recommended to set core.autocrlf Git attribute to " + RECOMMENDED_VALUE + + "It is recommended to set the core.autocrlf Git attribute to " + RECOMMENDED_VALUE + " to avoid line separator issues."); JLabel additionalDescription = new JBLabel( - "Fix and Commit: git config --global core.autocrlf " + RECOMMENDED_VALUE + " will be called,
" + - "Commit as Is: the config value won't be set.", UIUtil.ComponentStyle.SMALL); + "If you choose Fix and Commit, git config --global core.autocrlf " + RECOMMENDED_VALUE + " will be executed.
" + + "If you choose Commit as Is, the config value won't be changed."); - JLabel readMore = LinkLabel.create("Read more", () -> BrowserUtil.browse("https://help.github.com/articles/dealing-with-line-endings")); JLabel icon = new JLabel(UIUtil.getWarningIcon(), SwingConstants.LEFT); myDontWarn = new JBCheckBox("Don't warn again"); @@ -89,7 +86,6 @@ public class GitCrlfDialog extends DialogWrapper { rootPanel.add(icon, g.nextLine().next().coverColumn(4)); rootPanel.add(description, g.next()); - rootPanel.add(readMore, g.nextLine().next().next()); rootPanel.add(additionalDescription, g.nextLine().next().next().pady(DEFAULT_HGAP)); rootPanel.add(myDontWarn, g.nextLine().next().next().insets(0, 0, 0, 0));