From ce92a9e826d9d6f443c56d64769fa4fe192c31bf Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Fri, 3 Jul 2020 07:58:55 +0200 Subject: [PATCH] notify user that a download is in progress --- GateKeeper.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/GateKeeper.cpp b/GateKeeper.cpp index 7e32a9e..631d798 100644 --- a/GateKeeper.cpp +++ b/GateKeeper.cpp @@ -1,10 +1,13 @@ -#include "stdafx.h" +#include "stdafx.h" #include "GateKeeper.h" #include "pEpCOMServerAdapter.h" +#include "CMainWindow.h" using namespace std; +extern CMainWindow mainWindow; + // from https://msdn.microsoft.com/en-us/library/windows/desktop/dd388945(v=vs.85).aspx struct PUBLIC_KEY_VALUES { @@ -519,6 +522,9 @@ namespace pEp { DWORD reading; InternetReadFile(hUrl, iv, sizeof(iv), &reading); + if (reading) + mainWindow.ShowNotificationInfo(_T("Downloading update"), _T("An update for p≡p arrived and is being downloaded.")); + if (reading) do { static char buffer[1024 * 1024]; BOOL bResult = InternetReadFile(hUrl, buffer, 1024 * 1024, &reading);