Skip to content

Commit e5e0fa5

Browse files
committed
Fix display of progress window during update check
1 parent 7faa1d6 commit e5e0fa5

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

src/EarlyUpdateCheck.cs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,16 @@ private void KeyPromptFormAdded()
211211
//==> Update window might be shown AFTER "Open Database" window is shown
212212
if (PluginConfig.CheckSync)
213213
{
214+
PluginDebug.AddInfo("UpdateCheck start", 0, DebugPrint);
214215
m_bRestartInvoke = true;
215-
m_slUpdateCheck = CreateUpdateCheckLogger();
216-
PluginDebug.AddInfo("UpdateCheck start", DebugPrint);
216+
try
217+
{
218+
m_slUpdateCheck = CreateUpdateCheckLogger();
219+
}
220+
catch (Exception ex)
221+
{
222+
PluginDebug.AddError("UpdateCheck error", 0, "Initialising StatusLogger failed", ex.Message, DebugPrint);
223+
}
217224
ThreadPool.QueueUserWorkItem(new WaitCallback(CheckForUpdates));
218225
while (true)
219226
{
@@ -225,7 +232,7 @@ private void KeyPromptFormAdded()
225232
}
226233
}
227234
if (m_slUpdateCheck != null) m_slUpdateCheck.EndLogging();
228-
PluginDebug.AddInfo("UpdateCheck finished ", DebugPrint);
235+
PluginDebug.AddInfo("UpdateCheck finished ", 0, DebugPrint);
229236
}
230237
if ((m_UpdateCheckStatus == UpdateCheckStatus.NotChecked) || (m_UpdateCheckStatus == UpdateCheckStatus.Error)) UpdateCheckEx.Run(false, null);
231238
CheckPluginLanguages();
@@ -283,7 +290,7 @@ private UpdateCheckType UpdateCheckRequired()
283290

284291
private IStatusLogger CreateUpdateCheckLogger()
285292
{
286-
IStatusLogger sl = StatusUtil.CreateStatusDialog(m_host.MainWindow, out m_CheckProgress,
293+
IStatusLogger sl = StatusUtil.CreateStatusDialog(null, out m_CheckProgress,
287294
KeePass.Resources.KPRes.UpdateCheck, KeePass.Resources.KPRes.CheckingForUpd + "...", true, true);
288295
Button btnCancel = (Button)Tools.GetControl("m_btnCancel", m_CheckProgress);
289296
if (btnCancel != null)

src/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
//
2525
// You can specify all the values or you can use the default the Revision and
2626
// Build Numbers by using the '*' as shown below:
27-
[assembly: AssemblyVersion("2.1.1")]
28-
[assembly: AssemblyFileVersion("2.1.1")]
27+
[assembly: AssemblyVersion("2.1.2")]
28+
[assembly: AssemblyFileVersion("2.1.2")]
2929
[assembly: Guid("672570AF-CC57-4980-86F9-D48FD1CC707D")]

version.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:
2-
Early update check:2.1.1
2+
Early update check:2.1.2
33
Early update check!de:3
44
Early update check!ru:2
55
:

0 commit comments

Comments
 (0)