Skip to content

Commit

Permalink
Add option to disable automatic update search
Browse files Browse the repository at this point in the history
Fixes issue gitextensions#5501
  • Loading branch information
c3er committed Oct 3, 2018
1 parent 7aad0f6 commit c4df92c
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 17 deletions.
6 changes: 6 additions & 0 deletions GitCommands/Settings/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,6 +1504,12 @@ public static DateTime LastUpdateCheck
set => SetDate("LastUpdateCheck", value);
}

public static bool CheckForUpdates
{
get => GetBool("CheckForUpdates", true);
set => SetBool("CheckForUpdates", value);
}

public static bool CheckForReleaseCandidates
{
get => GetBool("CheckForReleaseCandidates", false);
Expand Down
2 changes: 1 addition & 1 deletion GitUI/CommandsDialogs/FormBrowse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ private void InternalInitialize(bool hard)
using (WaitCursorScope.Enter())
{
// check for updates
if (AppSettings.LastUpdateCheck.AddDays(7) < DateTime.Now)
if (AppSettings.CheckForUpdates && AppSettings.LastUpdateCheck.AddDays(7) < DateTime.Now)
{
AppSettings.LastUpdateCheck = DateTime.Now;
var updateForm = new FormUpdates(AppSettings.AppVersion);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ protected override void SettingsToPage()
chkUseLocalChangesAction.Checked = AppSettings.UseDefaultCheckoutBranchAction;
chkDontSHowHelpImages.Checked = AppSettings.DontShowHelpImages;
chkAlwaysShowAdvOpt.Checked = AppSettings.AlwaysShowAdvOpt;
chkCheckForUpdates.Checked = AppSettings.CheckForUpdates;
chkCheckForRCVersions.Checked = AppSettings.CheckForReleaseCandidates;
chkConsoleEmulator.Checked = AppSettings.UseConsoleEmulatorForCommands;
chkAutoNormaliseBranchName.Checked = AppSettings.AutoNormaliseBranchName;
Expand All @@ -43,6 +44,7 @@ protected override void PageToSettings()
AppSettings.UseDefaultCheckoutBranchAction = chkUseLocalChangesAction.Checked;
AppSettings.DontShowHelpImages = chkDontSHowHelpImages.Checked;
AppSettings.AlwaysShowAdvOpt = chkAlwaysShowAdvOpt.Checked;
AppSettings.CheckForUpdates = chkCheckForUpdates.Checked;
AppSettings.CheckForReleaseCandidates = chkCheckForRCVersions.Checked;
AppSettings.UseConsoleEmulatorForCommands = chkConsoleEmulator.Checked;
AppSettings.AutoNormaliseBranchName = chkAutoNormaliseBranchName.Checked;
Expand Down
4 changes: 4 additions & 0 deletions GitUI/Translation/English.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
<source>Auto normalise branch name</source>
<target />
</trans-unit>
<trans-unit id="chkCheckForUpdates.Text">
<source>Check for updates weekly</source>
<target />
</trans-unit>
<trans-unit id="chkCheckForRCVersions.Text">
<source>Check for release candidate versions</source>
<target />
Expand Down
5 changes: 5 additions & 0 deletions GitUI/Translation/German.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen vo
<source>Auto normalise branch name</source>
<target>Branchname automatisch normalisieren</target>

</trans-unit>
<trans-unit id="chkCheckForUpdates.Text">
<source>Check for updates weekly</source>
<target>Wöchentlich nach updates suchen</target>

</trans-unit>
<trans-unit id="chkCheckForRCVersions.Text">
<source>Check for release candidate versions</source>
Expand Down

0 comments on commit c4df92c

Please sign in to comment.