[RAPPS] Display error messages on download failures. Patch by toe_head2001. Thank...
authorRobert Naumann <gonzomdx@gmail.com>
Fri, 4 Mar 2016 16:10:26 +0000 (16:10 +0000)
committerRobert Naumann <gonzomdx@gmail.com>
Fri, 4 Mar 2016 16:10:26 +0000 (16:10 +0000)
svn path=/trunk/; revision=70915

23 files changed:
reactos/base/applications/rapps/lang/bg-BG.rc
reactos/base/applications/rapps/lang/cs-CZ.rc
reactos/base/applications/rapps/lang/de-DE.rc
reactos/base/applications/rapps/lang/en-US.rc
reactos/base/applications/rapps/lang/es-ES.rc
reactos/base/applications/rapps/lang/fr-FR.rc
reactos/base/applications/rapps/lang/he-IL.rc
reactos/base/applications/rapps/lang/it-IT.rc
reactos/base/applications/rapps/lang/ja-JP.rc
reactos/base/applications/rapps/lang/no-NO.rc
reactos/base/applications/rapps/lang/pl-PL.rc
reactos/base/applications/rapps/lang/pt-BR.rc
reactos/base/applications/rapps/lang/ro-RO.rc
reactos/base/applications/rapps/lang/ru-RU.rc
reactos/base/applications/rapps/lang/sk-SK.rc
reactos/base/applications/rapps/lang/sq-AL.rc
reactos/base/applications/rapps/lang/sv-SE.rc
reactos/base/applications/rapps/lang/tr-TR.rc
reactos/base/applications/rapps/lang/uk-UA.rc
reactos/base/applications/rapps/lang/zh-CN.rc
reactos/base/applications/rapps/lang/zh-TW.rc
reactos/base/applications/rapps/loaddlg.c
reactos/base/applications/rapps/resource.h

index 73efe07..4d7e746 100644 (file)
@@ -204,4 +204,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 39d7db3..8e4427a 100644 (file)
@@ -205,4 +205,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index de56798..a6830c9 100644 (file)
@@ -200,4 +200,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "Überprüfung des SSL-Zertifikats fehlgeschlagen."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 05705e8..ea1c315 100644 (file)
@@ -200,4 +200,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 87ee16c..0c14aef 100644 (file)
@@ -203,4 +203,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "Ha fallado la comprobación del certificado SSL."
     IDS_INTEG_CHECK_TITLE "Verificando integridad del paquete..."
     IDS_INTEG_CHECK_FAIL "El paquete no ha pasado la comprobación de integridad, puede haber sido alterado o estar corrupto. No se recomienda ejecutarlo."
+    IDS_INTERRUPTED_DOWNLOAD "Se ha interrumpido la descarga por un error de red. Comprueba la conexión a Internet."
+    IDS_UNABLE_TO_WRITE "No se ha podido escribir en el disco duro, es posible que no quede espacio libre."
 END
index 3047ba6..1613c4a 100644 (file)
@@ -200,4 +200,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "La vérification du certificat SSL a échoué."
     IDS_INTEG_CHECK_TITLE "Vérification de l'intégrité du paquet..."
     IDS_INTEG_CHECK_FAIL "Le contrôle d'intégrité du paquet a échoué, il se peut qu'il ait été corrompu ou altéré au cours du téléchargement. L'exécution du programme n'est pas recommandée."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 6862399..31e3187 100644 (file)
@@ -202,4 +202,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 356a75a..50f97e9 100644 (file)
@@ -200,4 +200,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 91633c4..cf48431 100644 (file)
@@ -200,4 +200,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 7daf3a8..5de67c6 100644 (file)
@@ -200,4 +200,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index f71e4ab..f85dd94 100644 (file)
@@ -208,4 +208,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index a20a58c..43c8477 100644 (file)
@@ -202,4 +202,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index f59f3b2..b5383db 100644 (file)
@@ -206,4 +206,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "Verificarea certificatului SSL a eșuat."    
     IDS_INTEG_CHECK_TITLE "Se verifică integritatea pachetului…"
     IDS_INTEG_CHECK_FAIL "Pachetul nu a trecut de verificarea de integritate. Utilizarea programului nu este recomandată."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 71d8d72..4ddac4c 100644 (file)
@@ -200,4 +200,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "Ошибка проверки SSL сертификата."
     IDS_INTEG_CHECK_TITLE "Проверка целостности приложения..."
     IDS_INTEG_CHECK_FAIL "Приложение не прошло проверку целостности, возможно оно было повреждено или подменено. Запуск приложения не рекомендуется."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index aadcc53..c5286da 100644 (file)
@@ -205,4 +205,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 5878f70..331d6d7 100644 (file)
@@ -204,4 +204,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 2120212..c845dbb 100644 (file)
@@ -207,4 +207,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 3cb3b58..264d440 100644 (file)
@@ -202,4 +202,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL onay belgesi doğrulaması başarısız."
     IDS_INTEG_CHECK_TITLE "Paket bütünlüğü doğrulanıyor..."
     IDS_INTEG_CHECK_FAIL "Paket bütünlük denetimini geçmedi, bozulmuş veyâ indirme esnâsında oynanmış olabilir. Yazılımı çalıştırmak önerilmez."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 39357ef..7f0f4f0 100644 (file)
@@ -208,4 +208,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index ec069ca..f0c5661 100644 (file)
@@ -203,4 +203,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
     IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
     IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have been corrupted or tampered with during downloading. Running the software is not recommended."
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index 3f7bf43..2b8035b 100644 (file)
@@ -202,4 +202,6 @@ BEGIN
     IDS_CERT_DOES_NOT_MATCH "SSL 憑證驗證失敗。"
     IDS_INTEG_CHECK_TITLE "驗證套裝軟體的完整性..."
     IDS_INTEG_CHECK_FAIL "包沒有通過完整性檢查,它可能已損壞,或者在下載過程中篡改。建議您不要運行該軟體。"
+    IDS_INTERRUPTED_DOWNLOAD "The download was interrupted. Check connection to Internet."
+    IDS_UNABLE_TO_WRITE "Unable to write to disk. Disk may be at capacity."
 END
index b81b642..7ed8159 100644 (file)
@@ -458,8 +458,26 @@ ThreadFunc(LPVOID Context)
 
     do
     {
-        if (!InternetReadFile(hFile, lpBuffer, _countof(lpBuffer), &dwBytesRead)) goto end;
-        if (!WriteFile(hOut, &lpBuffer[0], dwBytesRead, &dwBytesWritten, NULL)) goto end;
+        if (!InternetReadFile(hFile, lpBuffer, _countof(lpBuffer), &dwBytesRead))
+        {
+            WCHAR szMsgText[MAX_STR_LEN];
+
+            if (!LoadStringW(hInst, IDS_INTERRUPTED_DOWNLOAD, szMsgText, _countof(szMsgText)))
+                goto end;
+
+            MessageBoxW(hMainWnd, szMsgText, NULL, MB_OK | MB_ICONERROR);
+            goto end;
+        }
+        if (!WriteFile(hOut, &lpBuffer[0], dwBytesRead, &dwBytesWritten, NULL))
+        {
+            WCHAR szMsgText[MAX_STR_LEN];
+
+            if (!LoadStringW(hInst, IDS_UNABLE_TO_WRITE, szMsgText, _countof(szMsgText)))
+                goto end;
+
+            MessageBoxW(hMainWnd, szMsgText, NULL, MB_OK | MB_ICONERROR);
+            goto end;
+        }
         dwCurrentBytesRead += dwBytesRead;
         IBindStatusCallback_OnProgress(dl, dwCurrentBytesRead, dwContentLen, 0, AppInfo->szUrlDownload);
     }
index 7362b76..b65bcf9 100644 (file)
@@ -99,6 +99,8 @@
 #define IDS_CERT_DOES_NOT_MATCH  120
 #define IDS_INTEG_CHECK_TITLE    121
 #define IDS_INTEG_CHECK_FAIL     122
+#define IDS_INTERRUPTED_DOWNLOAD 123
+#define IDS_UNABLE_TO_WRITE      124
 
 /* Tooltips */
 #define IDS_TOOLTIP_INSTALL      200