Skip to content

Commit

Permalink
Fix display of progress window during update check
Browse files Browse the repository at this point in the history
  • Loading branch information
Rookiestyle committed Sep 5, 2020
1 parent 7faa1d6 commit e5e0fa5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions src/EarlyUpdateCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,16 @@ private void KeyPromptFormAdded()
//==> Update window might be shown AFTER "Open Database" window is shown
if (PluginConfig.CheckSync)
{
PluginDebug.AddInfo("UpdateCheck start", 0, DebugPrint);
m_bRestartInvoke = true;
m_slUpdateCheck = CreateUpdateCheckLogger();
PluginDebug.AddInfo("UpdateCheck start", DebugPrint);
try
{
m_slUpdateCheck = CreateUpdateCheckLogger();
}
catch (Exception ex)
{
PluginDebug.AddError("UpdateCheck error", 0, "Initialising StatusLogger failed", ex.Message, DebugPrint);
}
ThreadPool.QueueUserWorkItem(new WaitCallback(CheckForUpdates));
while (true)
{
Expand All @@ -225,7 +232,7 @@ private void KeyPromptFormAdded()
}
}
if (m_slUpdateCheck != null) m_slUpdateCheck.EndLogging();
PluginDebug.AddInfo("UpdateCheck finished ", DebugPrint);
PluginDebug.AddInfo("UpdateCheck finished ", 0, DebugPrint);
}
if ((m_UpdateCheckStatus == UpdateCheckStatus.NotChecked) || (m_UpdateCheckStatus == UpdateCheckStatus.Error)) UpdateCheckEx.Run(false, null);
CheckPluginLanguages();
Expand Down Expand Up @@ -283,7 +290,7 @@ private UpdateCheckType UpdateCheckRequired()

private IStatusLogger CreateUpdateCheckLogger()
{
IStatusLogger sl = StatusUtil.CreateStatusDialog(m_host.MainWindow, out m_CheckProgress,
IStatusLogger sl = StatusUtil.CreateStatusDialog(null, out m_CheckProgress,
KeePass.Resources.KPRes.UpdateCheck, KeePass.Resources.KPRes.CheckingForUpd + "...", true, true);
Button btnCancel = (Button)Tools.GetControl("m_btnCancel", m_CheckProgress);
if (btnCancel != null)
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.1.1")]
[assembly: AssemblyFileVersion("2.1.1")]
[assembly: AssemblyVersion("2.1.2")]
[assembly: AssemblyFileVersion("2.1.2")]
[assembly: Guid("672570AF-CC57-4980-86F9-D48FD1CC707D")]
2 changes: 1 addition & 1 deletion version.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:
Early update check:2.1.1
Early update check:2.1.2
Early update check!de:3
Early update check!ru:2
:

0 comments on commit e5e0fa5

Please sign in to comment.