mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-22 20:37:19 -08:00
code_style: rename platform_finder
to platformFinder
and run dotnet format
to apply code style rules
This commit is contained in:
parent
09b8564636
commit
a5150edee0
6 changed files with 21 additions and 19 deletions
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
public class IsConflictResolved : Command
|
||||
{
|
||||
public IsConflictResolved(string repo, Models.Change change)
|
||||
public IsConflictResolved(string repo, Models.Change change)
|
||||
{
|
||||
var opt = new Models.DiffOption(change, true);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace SourceGit.Converters
|
|||
public static readonly FuncValueConverter<bool, double> HalfIfFalse =
|
||||
new FuncValueConverter<bool, double>(x => x ? 1 : 0.5);
|
||||
|
||||
public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue =
|
||||
public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue =
|
||||
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -116,31 +116,31 @@ namespace SourceGit.Models
|
|||
});
|
||||
}
|
||||
|
||||
public void VSCode(Func<string> platform_finder)
|
||||
public void VSCode(Func<string> platformFinder)
|
||||
{
|
||||
TryAdd("Visual Studio Code", "vscode", "\"{0}\"", "VSCODE_PATH", platform_finder);
|
||||
TryAdd("Visual Studio Code", "vscode", "\"{0}\"", "VSCODE_PATH", platformFinder);
|
||||
}
|
||||
|
||||
public void VSCodeInsiders(Func<string> platform_finder)
|
||||
public void VSCodeInsiders(Func<string> platformFinder)
|
||||
{
|
||||
TryAdd("Visual Studio Code - Insiders", "vscode_insiders", "\"{0}\"", "VSCODE_INSIDERS_PATH", platform_finder);
|
||||
TryAdd("Visual Studio Code - Insiders", "vscode_insiders", "\"{0}\"", "VSCODE_INSIDERS_PATH", platformFinder);
|
||||
}
|
||||
|
||||
public void Fleet(Func<string> platform_finder)
|
||||
public void Fleet(Func<string> platformFinder)
|
||||
{
|
||||
TryAdd("Fleet", "fleet", "\"{0}\"", "FLEET_PATH", platform_finder);
|
||||
TryAdd("Fleet", "fleet", "\"{0}\"", "FLEET_PATH", platformFinder);
|
||||
}
|
||||
|
||||
public void SublimeText(Func<string> platform_finder)
|
||||
public void SublimeText(Func<string> platformFinder)
|
||||
{
|
||||
TryAdd("Sublime Text", "sublime_text", "\"{0}\"", "SUBLIME_TEXT_PATH", platform_finder);
|
||||
TryAdd("Sublime Text", "sublime_text", "\"{0}\"", "SUBLIME_TEXT_PATH", platformFinder);
|
||||
}
|
||||
|
||||
public void FindJetBrainsFromToolbox(Func<string> platform_finder)
|
||||
public void FindJetBrainsFromToolbox(Func<string> platformFinder)
|
||||
{
|
||||
var exclude = new List<string> { "fleet", "dotmemory", "dottrace", "resharper-u", "androidstudio" };
|
||||
var supported_icons = new List<string> { "CL", "DB", "DL", "DS", "GO", "IC", "IU", "JB", "PC", "PS", "PY", "QA", "QD", "RD", "RM", "RR", "WRS", "WS" };
|
||||
var state = Path.Combine(platform_finder(), "state.json");
|
||||
var state = Path.Combine(platformFinder(), "state.json");
|
||||
if (File.Exists(state))
|
||||
{
|
||||
var stateData = JsonSerializer.Deserialize(File.ReadAllText(state), JsonCodeGen.Default.JetBrainsState);
|
||||
|
|
|
@ -58,11 +58,11 @@ namespace SourceGit.ViewModels
|
|||
Commands.Discard.All(_repo.FullPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SetProgressDescription("Checkout branch ...");
|
||||
var rs = new Commands.Checkout(_repo.FullPath).Branch(Branch, SetProgressDescription);
|
||||
|
||||
if(needPopStash)
|
||||
|
||||
if (needPopStash)
|
||||
{
|
||||
SetProgressDescription("Re-apply local changes...");
|
||||
rs = new Commands.Stash(_repo.FullPath).Apply("stash@{0}");
|
||||
|
@ -71,7 +71,7 @@ namespace SourceGit.ViewModels
|
|||
rs = new Commands.Stash(_repo.FullPath).Drop("stash@{0}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return rs;
|
||||
});
|
||||
|
|
|
@ -853,7 +853,7 @@ namespace SourceGit.ViewModels
|
|||
checkout.Icon = App.CreateMenuIcon("Icons.Check");
|
||||
checkout.Click += (o, e) =>
|
||||
{
|
||||
CheckoutLocalBranch(branch.Name);
|
||||
CheckoutLocalBranch(branch.Name);
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(checkout);
|
||||
|
|
|
@ -686,12 +686,14 @@ namespace SourceGit.Views
|
|||
|
||||
private void OnTextAreaPointerWheelChanged(object sender, PointerWheelEventArgs e)
|
||||
{
|
||||
if (!TextArea.IsFocused) Focus();
|
||||
if (!TextArea.IsFocused)
|
||||
Focus();
|
||||
}
|
||||
|
||||
private void OnTextViewScrollChanged(object sender, ScrollChangedEventArgs e)
|
||||
{
|
||||
if (TextArea.IsFocused) SetCurrentValue(SyncScrollOffsetProperty, _scrollViewer.Offset);
|
||||
if (TextArea.IsFocused)
|
||||
SetCurrentValue(SyncScrollOffsetProperty, _scrollViewer.Offset);
|
||||
}
|
||||
|
||||
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e)
|
||||
|
|
Loading…
Reference in a new issue