From 600c5bcb32c94c1cb86fa39f05568be10003d6a9 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 20 Jul 2014 12:08:26 +0000 Subject: strange, but dbchecker doesn't count fatal errors as errors... git-svn-id: http://svn.miranda-ng.org/main/trunk@9883 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/DbChecker/src/progress.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/DbChecker/src/progress.cpp b/plugins/DbChecker/src/progress.cpp index ad12ca550c..a694ce9369 100644 --- a/plugins/DbChecker/src/progress.cpp +++ b/plugins/DbChecker/src/progress.cpp @@ -47,8 +47,11 @@ void AddToStatus(int flags, const TCHAR* fmt, ...) OutputDebugStringA("\n"); #endif - if ((flags & STATUS_CLASSMASK) == STATUS_ERROR) + switch (flags & STATUS_CLASSMASK) { + case STATUS_ERROR: + case STATUS_FATAL: errorCount++; + } } void SetProgressBar(int perThou) @@ -124,7 +127,7 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM HFONT hoFont; if ((int)dis->itemID == -1) break; SendMessage(dis->hwndItem, LB_GETTEXT, dis->itemID, (LPARAM)str); - switch(dis->itemData&STATUS_CLASSMASK) { + switch(dis->itemData & STATUS_CLASSMASK) { case STATUS_MESSAGE: SetTextColor(dis->hDC, RGB(0, 0, 0)); break; @@ -178,9 +181,11 @@ INT_PTR CALLBACK ProgressDlgProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM case WZN_CANCELCLICKED: if (bShortModeDone) { - if (bLaunchMiranda) - CallService(MS_DB_SETDEFAULTPROFILE, (WPARAM)opts.filename, 0); - wizardResult = 1; + if (!errorCount) { + if (bLaunchMiranda) + CallService(MS_DB_SETDEFAULTPROFILE, (WPARAM)opts.filename, 0); + wizardResult = 1; + } return TRUE; } -- cgit v1.2.3