Skip to content

Commit

Permalink
Update naming of menu item and related variables and methods accordin…
Browse files Browse the repository at this point in the history
…g to feedback
  • Loading branch information
jwfx committed Jun 20, 2021
1 parent f448590 commit 56c86b8
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions GitCommands/Settings/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1259,10 +1259,10 @@ public static int RevisionGridQuickSearchTimeout
set => SetInt("revisiongridquicksearchtimeout", value);
}

public static bool ShowMultiLineCommitMessages
public static bool ShowCommitBodyInRevisionGrid
{
get => GetBool("showmultilinecommitmessages", true);
set => SetBool("showmultilinecommitmessages", value);
get => GetBool("showcommitbodyinrevisiongrid", true);
set => SetBool("showcommitbodyinrevisiongrid", value);
}

/// <summary>Gets or sets the path to the git application executable.</summary>
Expand Down
2 changes: 1 addition & 1 deletion GitUI/CommandsDialogs/FormBrowse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ private void RefreshSelection()
FillCommitInfo(selectedRevision);

// If the revision's body has been updated then the grid needs to be refreshed to display it
if (AppSettings.ShowMultiLineCommitMessages && selectedRevision is not null && selectedRevision.HasMultiLineMessage && oldBody != selectedRevision.Body)
if (AppSettings.ShowCommitBodyInRevisionGrid && selectedRevision is not null && selectedRevision.HasMultiLineMessage && oldBody != selectedRevision.Body)
{
RevisionGrid.Refresh();
}
Expand Down
8 changes: 4 additions & 4 deletions GitUI/Translation/English.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -8867,6 +8867,10 @@ See the changes in the commit form.</source>
<source>Show build status text</source>
<target />
</trans-unit>
<trans-unit id="showCommitMessageBodyToolStripMenuItem.Text">
<source>Show commit message body</source>
<target />
</trans-unit>
<trans-unit id="showDateColumnToolStripMenuItem.Text">
<source>Show date column</source>
<target />
Expand Down Expand Up @@ -8899,10 +8903,6 @@ See the changes in the commit form.</source>
<source>Show tags</source>
<target />
</trans-unit>
<trans-unit id="showMultiLineCommitMessagesToolStripMenuItem.Text">
<source>Show multi-line commit messages</source>
<target />
</trans-unit>
</body>
</file>
<file datatype="plaintext" original="RevisionGridControl" source-language="en">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ void DrawSuperProjectRef(string label, ref int currentOffset)
return;
}

if (AppSettings.ShowMultiLineCommitMessages)
if (AppSettings.ShowCommitBodyInRevisionGrid)
{
var commitBody = string.Concat(lines.Skip(1).Select(_ => " " + _));
var bodyBounds = messageBounds.ReduceLeft(offset);
Expand Down
4 changes: 2 additions & 2 deletions GitUI/UserControls/RevisionGrid/RevisionGridControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2185,9 +2185,9 @@ internal void ToggleShowMergeCommits()
ForceRefreshRevisions();
}

internal void ToggleShowMultiLineCommit()
internal void ShowCommitBodyInRevisionGrid()
{
AppSettings.ShowMultiLineCommitMessages = !AppSettings.ShowMultiLineCommitMessages;
AppSettings.ShowCommitBodyInRevisionGrid = !AppSettings.ShowCommitBodyInRevisionGrid;
MenuCommands.TriggerMenuChanged();
Refresh();
}
Expand Down
8 changes: 4 additions & 4 deletions GitUI/UserControls/RevisionGrid/RevisionGridMenuCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ private IReadOnlyList<MenuCommand> CreateViewMenuCommands()
},
new MenuCommand
{
Name = "showMultiLineCommitMessagesToolStripMenuItem",
Text = "Show multi-line commit messages",
ExecuteAction = () => _revisionGrid.ToggleShowMultiLineCommit(),
IsCheckedFunc = () => AppSettings.ShowMultiLineCommitMessages
Name = "showCommitMessageBodyToolStripMenuItem",
Text = "Show commit message body",
ExecuteAction = () => _revisionGrid.ShowCommitBodyInRevisionGrid(),
IsCheckedFunc = () => AppSettings.ShowCommitBodyInRevisionGrid
},

MenuCommand.CreateSeparator(),
Expand Down

0 comments on commit 56c86b8

Please sign in to comment.