From e5e0fa5064fde03b1e693c8069930ef78d7bed77 Mon Sep 17 00:00:00 2001 From: Rookiestyle Date: Sat, 5 Sep 2020 12:44:28 +0200 Subject: [PATCH] Fix display of progress window during update check --- src/EarlyUpdateCheck.cs | 15 +++++++++++---- src/Properties/AssemblyInfo.cs | 4 ++-- version.info | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/EarlyUpdateCheck.cs b/src/EarlyUpdateCheck.cs index 42b6ac4..2831df9 100644 --- a/src/EarlyUpdateCheck.cs +++ b/src/EarlyUpdateCheck.cs @@ -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) { @@ -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(); @@ -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) diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index 6ee9f8d..53b1e8f 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -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")] \ No newline at end of file diff --git a/version.info b/version.info index 69f9412..dcec5e4 100644 --- a/version.info +++ b/version.info @@ -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 : \ No newline at end of file